WO2023185166A1 - Service call method and apparatus, device and storage medium - Google Patents

Service call method and apparatus, device and storage medium Download PDF

Info

Publication number
WO2023185166A1
WO2023185166A1 PCT/CN2022/143347 CN2022143347W WO2023185166A1 WO 2023185166 A1 WO2023185166 A1 WO 2023185166A1 CN 2022143347 W CN2022143347 W CN 2022143347W WO 2023185166 A1 WO2023185166 A1 WO 2023185166A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
target
request
target service
server
Prior art date
Application number
PCT/CN2022/143347
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 WO2023185166A1 publication Critical patent/WO2023185166A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Definitions

  • the embodiments of the present application relate to the field of computer technology, and in particular to a service invoking method, device, equipment and storage medium.
  • Command control is a technology that recognizes and analyzes user commands and controls the device to perform corresponding operations based on the recognition and analysis results.
  • Common command controls include gesture control, voice control, etc.
  • Embodiments of the present application provide a service invoking method, device, equipment and storage medium.
  • the technical solutions are as follows:
  • embodiments of the present application provide a service invoking method, which is executed by a first device.
  • the method includes:
  • the service call request is used to request the second device to call the target service to perform the target action;
  • embodiments of the present application provide a service invoking method, which is executed by a second device.
  • the method includes:
  • Receive a service invocation request sent by the first device the service invocation request is used to request to call a target service to perform a target action, the service invocation request is generated by the first device based on the first instruction recognition result of the first input instruction.
  • a service invoking device which includes:
  • An instruction identification module used to identify the first input instruction and obtain the first instruction identification result
  • a request generation module configured to generate a service invocation request based on the first instruction recognition result, the service invocation request being used to request the second device to invoke the target service to perform the target action;
  • a request sending module configured to send the service invocation request to the second device, so that the second device deploys the target service based on the target service installation package and calls the target service to perform the target action, so The above target service installation package is obtained from the server.
  • a service invoking device which includes:
  • a request receiving module configured to receive a service invocation request sent by the first device.
  • the service invocation request is used to request the invocation of a target service to perform a target action.
  • the service invocation request is generated by the first device based on a response to a first input instruction.
  • the first instruction recognition result is generated;
  • An installation package acquisition module configured to obtain the target service installation package of the target service from the server based on the service invocation request
  • a service deployment module configured to deploy the target service based on the target service installation package
  • An execution module is used to call the target service to execute the target action.
  • inventions of the present application provide a computer device.
  • the computer device includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the following: The service calling method described in the above aspects.
  • embodiments of the present application provide a computer-readable storage medium in which at least one program code is stored, and the program code is loaded and executed by a processor to implement the above aspects. service calling method.
  • inventions of the present application provide a computer program product or computer program.
  • the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the service invocation method provided in various optional implementations of the above aspect.
  • Figure 1 shows a system architecture diagram of a service invocation system provided by an exemplary embodiment of the present application
  • Figure 2 shows a flow chart of a service invoking method provided by an exemplary embodiment of the present application
  • Figure 3 shows a schematic implementation diagram of a service invoking method provided by an exemplary embodiment of the present application
  • Figure 4 shows a schematic diagram of the service definition and installation package upload process provided by an exemplary embodiment of the present application
  • Figure 5 shows a flow chart of a service invoking method provided by another exemplary embodiment of the present application.
  • Figure 6 shows a flow chart of a text parsing process provided by an exemplary embodiment of the present application
  • Figure 7 shows a schematic diagram of the implementation of the service dynamic deployment process provided by an exemplary embodiment of the present application
  • Figure 8 shows an implementation schematic diagram of the service update process provided by an exemplary embodiment of the present application
  • Figure 9 shows a flow chart of the service offloading process provided by an exemplary embodiment of the present application.
  • Figure 10 shows a schematic diagram of the implementation of the service offloading process provided by an exemplary embodiment of the present application
  • Figure 11 shows a structural block diagram of a service invoking device provided by an embodiment of the present application.
  • Figure 12 shows a structural block diagram of a service invoking device provided by another embodiment of the present application.
  • Figure 13 shows a structural block diagram of a computer device provided by an exemplary embodiment of the present application.
  • the screen capture service is used to implement the device screen capture function
  • the video playback service is used for video playback, and so on.
  • the device can call services deployed locally or services deployed on other devices (i.e., cross-end calls).
  • the first device can call the local video playback service to play the video, or can call the video playback service of the second device to realize video playback on the second device.
  • the services involved in the embodiments of this application support dynamic deployment.
  • the service installation package can be obtained dynamically, and the service deployment is completed based on the service installation package.
  • the service in the embodiment of the present application supports automatic uninstallation, which simplifies the service installation and uninstallation operation process.
  • services may include static services and dynamic services.
  • Static services refer to services provided by host applications and need to be pre-installed in the device
  • dynamic services refer to services that support dynamic deployment and can be used during the calling process.
  • Dynamically deployed in the device the service installation package of the dynamic service is stored in the server, and the device can download the service installation package from the server.
  • Figure 1 shows a system structure diagram of a service invocation system provided by an exemplary embodiment of the present application.
  • the system includes a first device 110, a second device 120 and a server 130.
  • the first device 110 is an electronic device with an instruction recognition function.
  • the instruction recognition function may be a voice recognition function, a gesture recognition function, a text recognition function, etc.
  • the electronic device may be a smartphone, a tablet computer, a wearable device, a personal computer, a vehicle-mounted terminal, etc. This implementation does not limit this .
  • the first device 110 can convert the input speech into speech text through the speech recognition module 111, and parse the speech text through the text parsing module 112 to obtain a speech recognition result (used to characterize user intent).
  • the first device 110 determines the external device that needs to be called (ie, the second device 120 in the figure) through the device selection module 113, And generate a service call request based on the speech recognition result, thereby sending the service call request to the external device.
  • the number of external devices is at least one.
  • the second device 120 is an electronic device that supports dynamic deployment services.
  • the electronic device may be a smartphone, a tablet, a wearable device, a personal computer, a vehicle-mounted terminal, etc., which is not limited in this implementation.
  • the second device 120 is provided with a service proxy 121.
  • the service proxy 121 receives the service invocation request sent by the first device 110, it first queries through the service management module 122 whether there is a service invocation request deployed locally. First service as indicated.
  • the service life cycle management module 123 is used to manage the life cycle of each service in the device. If the target service is deployed, the service life cycle management module 123 controls the service execution module 125 to call the target service to perform specific actions. If the target service is not deployed, the service management module 122 downloads the service installation package corresponding to the target service from the server 130 and stores it locally; the service installation module 124, under the control of the service life cycle management module 123, deploys according to the service installation package target service. In addition to controlling service installation and execution, the service life cycle management module 123 also controls the service uninstall module 126 to uninstall deployed services according to policies to avoid deploying too many services on the device.
  • the server 130 is a server, a service cluster or a cloud computing center composed of several servers. Divided according to the functions implemented, the server 130 includes a service definition management module 131, a service installation package management module 132, a subscription management module 133, a device management module 134 and a service gateway 135.
  • the service gateway 135 serves as an entrance for interaction between external devices and servers, and is used to dynamically route incoming traffic to designated management modules.
  • the service definition management module 131 is used to manage the service definition information of the service developed by the developer, and associate the service definition information with the corresponding service installation package, so that the corresponding service installation package can be subsequently obtained based on the service definition information.
  • the service installation package management module 132 is used to manage service installation packages of services developed by developers, and store the service installation packages in the file warehouse.
  • the subscription management module 123 is used to manage the subscription relationship between the device and the service, so as to subsequently control the device to perform service updates based on the subscription relationship.
  • the device management module 134 is used to manage the binding relationship between accounts and devices, as well as the device status of each device, and provide device selection basis for the device selection module 113 on the first device 110 side.
  • the above embodiment only describes the infrastructure of the service invocation system.
  • the system may also include other computer equipment (such as developer equipment) or servers that implement other functions. This embodiment does not constitute a limitation on this. .
  • Figure 2 shows a flow chart of a service invocation method provided by an exemplary embodiment of the present application.
  • This embodiment of the present application takes the application of this method to the service invocation system shown in Figure 1 as an example.
  • the method includes :
  • Step 201 The first device recognizes the first input command and obtains the first command recognition result.
  • the first input instruction may be a voice instruction, a gesture instruction, a text instruction, etc.
  • the embodiment of the present application does not limit the form of the input instruction.
  • the first device has a voice collection function.
  • the first device performs voice recognition on the first input voice to obtain the first voice recognition result.
  • the first speech recognition result is used to characterize the speech control intention.
  • the first device first converts the input speech into speech text, then parses the speech text, and determines the parameters required to generate the service call request as the speech recognition result.
  • the first device has an image acquisition function.
  • the first device performs gesture recognition on the first gesture, thereby based on the interaction between the gesture and the control instruction.
  • the mapping relationship is used to obtain a first gesture recognition result, and the first gesture recognition result is used to represent the control intention represented by the gesture.
  • the first device has a text input function.
  • the first device recognizes the first input text and obtains the first text recognition result.
  • the first text recognition result is used to characterize the control intention of the input text.
  • the first instruction recognition result includes parameters required to generate a service invocation request.
  • Step 202 The first device generates a service invocation request based on the first instruction recognition result.
  • the service invocation request is used to request the second device to invoke the target service to perform the target action.
  • the service invocation request may be a service invocation URL.
  • the embodiment of this application does not limit the specific form of the service invocation request.
  • the smartphone 31 generates a service call request based on the speech recognition result of "play xxx video on the car machine".
  • the service call request is used to request the car machine to call the video playback service to play the xxx video.
  • Step 203 The first device sends a service invocation request to the second device.
  • the first device after determining the second device that needs to be called, the first device obtains the device address of the second device, and then sends a service invocation request to the second device based on the device address.
  • the first device when the number of second devices is at least two, the first device sends a service invocation request to each second device, where different second devices correspond to different service invocation requests (some parameters in the requests are different, But they are all used to call the same service to perform the same action).
  • the smart phone 31 sends a service invocation request to the car machine 32.
  • Step 204 The second device receives the service invocation request sent by the first device.
  • the second device receives the service invocation request through a service proxy.
  • the second device verifies the service invocation request, and further responds to the service invocation request after passing the verification.
  • the verification methods include request integrity verification, call requester verification, parameter compliance verification, etc., which are not limited in the embodiments of this application.
  • the second device after receiving the service invocation request, the second device automatically determines whether to accept the request, or determines whether to accept the request based on user instructions. If the request is accepted, step 205 is executed; if the request is not accepted, the process ends (a call rejection notification may be sent to the first device).
  • Step 205 The second device obtains the target service installation package of the target service from the server based on the service invocation request.
  • the second device detects whether the target service indicated by the service invocation request is deployed. If the target service is deployed, the service call is made; if the target service is not deployed, the target service needs to be dynamically deployed first.
  • the second device When dynamically deploying the target service, the second device first obtains the target server installation package of the target service from the server.
  • the server is provided with a file warehouse, which contains service installation packages for dynamic services that implement different functions and support dynamic deployment.
  • the service support is developed by developers and uploaded to the server.
  • the developer calls the upload interface of the service installation package management module 132 through the service gateway 135 of the server 130 to upload the service installation package to the server 130 .
  • the successfully uploaded service installation package is associated with a unique installation package identification and stored in the file warehouse.
  • the service installation package management module 132 feeds back the installation package identification to the developer.
  • the developer associates the service definition information of the service with the installation package identifier, and then calls the upload interface of the service definition management module 131 through the service gateway 135 to save the service definition information in the server 130 .
  • the second device sends an installation package acquisition request to the server.
  • the service gateway of the server After receiving the request, the service gateway of the server routes the request to the service installation package management module and obtains the target service installation package from the file warehouse. , thereby feeding back the target service installation package to the second device.
  • the car machine 32 downloads the video playback service installation package from the server 33 .
  • Step 206 The second device deploys the target service based on the target service installation package.
  • the second device verifies the obtained target service installation package, and after passing the verification, dynamically deploys the target service based on the target service installation package.
  • Step 207 The second device calls the target service to perform the target action.
  • the second device determines the target action indicated by the service invocation request, and thereby calls the target service to perform the target action.
  • the vehicle computer 32 determines that the target action is "play xxx video", thereby calling the video playback service to play the xxx video.
  • a smartphone with a voice recognition function can also be used as a dispatch center to realize voice calls to in-car services; in When the car machine has a voice control function, it can avoid the impact on other services when the car machine frequently performs voice recognition (the performance of the car machine is usually lower than that of a smartphone, and the car machine needs to call important functions related to vehicle driving in real time. Serve).
  • the vehicle machine can dynamically deploy services after receiving a service call request, which can avoid content occupation caused by pre-deployment of services (especially some services with low frequency of use).
  • the first device with the command recognition function recognizes the input command, and sends a service invocation request to the second device based on the command recognition result, instructing the second device to call the target service to execute the target.
  • the action enables the second device to obtain the target service installation package from the server and deploy the target service based on the service invocation request, thereby calling the target service to perform the target action.
  • a service invocation request based on the first instruction recognition result including:
  • Send a service call request to the second device including:
  • a service invocation request is sent to the second device.
  • a service invocation request based on the first instruction recognition result including:
  • Send a service call request to the second device including:
  • a service invocation request is sent to the second device.
  • this method also includes:
  • a service uninstallation request based on the second instruction recognition result including:
  • the candidate device Based on the target device name and the target service name included in the second instruction recognition result, obtain the device address of at least one candidate device from the server, the candidate device matches the target device name and is deployed with the target service;
  • Send a service uninstallation request to the second device including:
  • a service uninstallation request is sent to the second device.
  • obtain the target service installation package of the target service from the server based on the service call request including:
  • the target service installation package When it is determined that the target service installation package does not exist locally based on the target service definition information, the target service installation package is obtained from the server based on the target service definition information.
  • the server stores the correspondence between the service definition information and the service installation package.
  • this method also includes:
  • a subscription message is sent to the server, and the server is used to maintain the subscription relationship between the second device and the target service based on the subscription message.
  • this method also includes:
  • the service update messages are pushed by the server based on the subscription relationship when the target service installation package is updated;
  • this method also includes:
  • a subscription cancellation message is sent to the server, and the server is used to delete the subscription relationship based on the subscription cancellation message.
  • this method also includes:
  • the service uninstallation request is used to request the second device to uninstall the target service, and the service uninstallation request is generated by the first device based on the second instruction recognition result of the second input instruction;
  • uninstall target services based on service uninstallation requests including:
  • this method also includes:
  • the target service is uninstalled when the automatic uninstallation conditions are met.
  • the automatic uninstallation conditions include at least one of the following: the number of calls to the target service reaches the number threshold, the target service is not called within the target duration, and the deployment duration of the target service reaches the duration threshold.
  • Figure 5 shows a flow chart of a service invocation method provided by another exemplary embodiment of the present application.
  • This embodiment of the present application takes the application of this method to the service invocation system shown in Figure 1 as an example to illustrate the method.
  • Step 501 The first device recognizes the first input command and obtains the first command recognition result.
  • the first instruction identification result includes the target device name of the device to be called, the target service name of the target service to be called, and the target action name of the target action.
  • text parsing is first pre-configured in the first device, so that text parsing is performed based on the pre-configured content during the application process.
  • the content configured during the text parsing preconfiguration process includes intent dictionary, intent slot, intent corpus, and intent reply.
  • the intent dictionary contains key-value pairs with the subject word as the key and a set of synonym lists as the value.
  • intent dictionary 1 is the device name
  • the value is the synonym list of the device name (for example, the key is the car machine, the valve is the vehicle terminal, the driving computer, etc.)
  • the key of intent dictionary 2 is the device name.
  • the service name of the service that needs to be called, and the value is the synonym list of the service name (for example, the key is the video playback service, and the value is open, show, etc.)
  • the key of the intent dictionary 3 is the action name of the required action, and the value is the action name. Corresponding synonym list.
  • Intent slots are preconfigured placeholder variables, and each intent slot corresponds to a unique intent dictionary. For example, if there are three intent slots configured, the variable in intent slot 1 is var1, which corresponds to intent dictionary 1; the variable in intent slot 2 is var2, which corresponds to intent dictionary 2; the variable in intent slot 3 is var3, which corresponds to intent dictionary 3. .
  • Intent corpus is generally modal prefix + subject or synonym in the intent dictionary + modal suffix or its grammatical variant. It can support regular corpus and irregular corpus. For example, configure a regular corpus and multiple irregular corpus:
  • the XXX video is opened on the car machine.
  • the intent reply is an operation performed when the output text matches the intent corpus.
  • it refers to obtaining the target device address information, assembling it with the variable value of the intent slot into a service call request, and initiating the call.
  • the first device matches the speech text with the above-mentioned intention corpus, and obtains the parameter value in the intention slot if the matching is successful.
  • Step 502 The first device obtains the device address of at least one candidate device from the server based on the target device name included in the first instruction recognition result, and the candidate device matches the target device name.
  • the first device obtains the name of at least one candidate device from the server. Device address.
  • the device address can be the address of the service agent in each candidate device, such as the gateway address of the service agent.
  • the candidate device is a device that matches the target device name and is associated with the first device.
  • the association relationship may include at least one of the following: logging in to the same user account, being in the same device group, or having a friend relationship, etc. This is not limited in the embodiment of the present application.
  • the device management module of the server stores the device address of each device under the user account (reported regularly by each device).
  • the device selection module of the first device obtains the device address of each candidate device under the current user account that matches the target device name by calling the device management module of the server.
  • the server will use car machine 1, car machine 2, and car machine 3.
  • Car machine 3 is determined as a candidate device, and the device addresses of car machine 1, car machine 2 and car machine 3 are sent to the smartphone.
  • Step 503 The first device determines the second device from at least one candidate device.
  • the first device needs to determine the second device from at least one candidate device.
  • the first device may automatically determine the second device, or determine the second device based on user instructions (that is, manually determine).
  • the second device determines the second device from at least one candidate device based on the target selection strategy.
  • the target selection strategy includes at least one of the following: a distance-based selection strategy (such as determining the candidate device closest to the first device as the second device), a priority-based selection strategy (such as based on a preset Device priority, determine the candidate device with the highest priority as the second device), status-based selection strategy (for example, determine the candidate device currently in use as the second device).
  • a distance-based selection strategy such as determining the candidate device closest to the first device as the second device
  • a priority-based selection strategy such as based on a preset Device priority, determine the candidate device with the highest priority as the second device
  • status-based selection strategy for example, determine the candidate device currently in use as the second device.
  • the server periodically obtains the device status of each device, and feeds the device status together with the device address to the first device.
  • the first device determines the candidate device in use among the candidate devices as the target device.
  • the second device displays a candidate device list, and the candidate device list includes a device identifier of at least one candidate device, so that the second device is determined based on a selection operation on the device identifier in the candidate device list.
  • the first device provides a list of candidate devices for the user to select, and determines at least one candidate device selected by the user as the target device.
  • the first device can also use other solutions (such as an automatic and manual combination solution) to determine the second device, and the embodiments of the present application are not limited to this.
  • Step 504 The first device generates a service invocation request based on the device address of the second device, the target service name and the target action name contained in the first instruction recognition result.
  • the first device generates corresponding service invocation requests for each of the determined second devices.
  • the first device uses the device address, target service name, and target action as parameters to form a service invocation link.
  • the smartphone generates a service call request based on "car machine 1 address”, "video playback service” and "play xxx video”.
  • Step 505 The first device sends a service invocation request to the second device.
  • the first device sends a service invocation request to the second device based on the device address of the second device.
  • Step 506 The second device receives the service invocation request sent by the first device.
  • Step 507 The second device obtains the target service definition information of the target service from the server based on the target service name included in the service invocation request.
  • the server stores the correspondence between the service definition information and the service installation package.
  • the second device obtains the target service name contained in the service invocation request, and thereby obtains the target service definition information of the target service from the server based on the target service name.
  • the service management module of the second device calls the server definition management module to obtain the target service definition information of the target service through the service gateway of the server.
  • the service management module 122 of the second device 120 calls the service definition management module 131 of the server 130 through the service gateway 135 to obtain the target service definition information.
  • Step 508 If it is determined based on the target service definition information that the target service installation package does not exist locally, the second device obtains the target service installation package from the server based on the target service definition information.
  • the service definition information of the service is associated with the installation package identification of the service installation package.
  • the second device detects whether the local storage contains the target service installation package based on the target installation package identifier associated with the target service definition information. If the target service installation package exists, the second device determines that dynamic deployment is not required; if the target service installation package does not exist, the second device further obtains the target service installation package from the server based on the target service definition information.
  • the second device calls the service installation package management module of the server to obtain the target service installation package through the service gateway of the server.
  • the service management module 122 of the second device 120 calls the service installation package management module 132 of the server 130 through the service gateway 135 to obtain the target service installation package.
  • Step 509 The second device deploys the target service based on the target service installation package.
  • Step 510 The second device calls the target service to perform the target action.
  • steps 509 to 510 For the implementation of the above-mentioned steps 509 to 510, reference can be made to steps 206 to 207, which will not be described in detail here in the embodiment of the present application.
  • the service life cycle management module 123 calls the service installation module 124 to deploy the target service, and then calls the service execution module 125 to execute the target action indicated by the request.
  • Step 511 The second device sends a subscription message to the server, and the server is used to maintain the subscription relationship between the second device and the target service based on the subscription message.
  • developers may update the developed services.
  • the server maintains the subscription relationship between each device and the service, so that when the service is updated based on the subscription relationship, the relevant device is promptly notified for service updates. Therefore, after obtaining the target installation package, the second device sends a subscription message to the server, instructing the server to update the service subscription information of the second device, that is, to add the target service to the service subscription information of the second device.
  • the second device 120 after obtaining the target service installation package, the second device 120 sends a subscription message to the service gateway 135, and the service gateway 135 calls the subscription management module 133 to update the subscription relationship of the second device.
  • the server can also automatically update the subscription relationship between the device and the service after providing the service installation package, which is not limited in this embodiment.
  • Step 512 The second device receives the service update message sent by the server.
  • the service update message is pushed by the server based on the subscription relationship when the target service installation package is updated.
  • the server pushes a service update message to each device that subscribes to the service based on the subscription relationship between the device and the service.
  • the service update message includes the service name.
  • the subscription relationship maintained in the server is shown in Table 1.
  • the server pushes service update messages to the car machine 1 and the smart TV 1 respectively based on the subscription relationship shown in Table 1.
  • the developer calls the upload interface of the service definition management module 131 through the service gateway 135, uploads the updated service definition information to the server 130, and calls the service installation package management module 131 through the service gateway 135.
  • the upload interface is used to upload the updated service installation package to the server 130.
  • the subscription management module 133 of the server 130 sends a service update message to the service agent 121 of the second device 120 through the service gateway 135 .
  • Step 513 The second device obtains the updated target service installation package from the server based on the service update message.
  • the second device obtains the updated target server installation package from the server, downloads the originally deployed target service, and deletes the originally stored target service installation package.
  • the service management module 122 of the second device 120 obtains the updated service installation package from the server 120 and stores it in local storage.
  • the second device may further redeploy the target service based on the updated target service installation package, or perform service deployment in real time when subsequently receiving a service invocation request, which is not limited in this embodiment.
  • the first device obtains the service definition information and determines whether the service installation package is stored locally based on the service definition information to avoid wasting traffic caused by repeated downloading when the service installation package is stored.
  • the server maintains the subscription relationship between the device and the service, and when the service is updated, pushes the service update message to the relevant device based on the subscription relationship to ensure the availability and timeliness of the service deployed on the device side. .
  • the second device can automatically uninstall the service according to the policy, or the user can control the second device to uninstall the service through instructions.
  • Figure 9 shows a flow chart of a service uninstallation process according to an exemplary embodiment of the present application.
  • Step 901 The first device recognizes the second input command and obtains the second command recognition result.
  • the second input instruction may be a voice instruction, a gesture instruction, a text instruction, etc.
  • the embodiment of the present application does not limit the form of the input instruction.
  • the first device when the input instruction is recognized and the control intention represented by the instruction identification result is to delete the deployed service, the first device obtains the second instruction identification result, wherein the second instruction identification result contains: Contains the parameters required to generate a service uninstall request.
  • the second instruction identification result includes the device name of the service to be uninstalled and the service name of the service to be uninstalled.
  • the smartphone performs speech recognition on "Delete the video playback service on the car machine", and the obtained speech recognition result includes the device name "car machine” and the service name "video playback service”.
  • Step 902 The first device generates a service uninstallation request based on the second instruction recognition result.
  • the service uninstallation request is used to request the second device to uninstall the target service.
  • the device name is included in the second command recognition result
  • the first device needs to determine the actual need for service from the candidate devices.
  • this step may include the following steps:
  • the first device obtains the device address of at least one candidate device from the server.
  • the device address can be the address of the service agent in each candidate device, such as the gateway address of the service agent.
  • the candidate device is a device that matches the target device name, is associated with the first device, and is deployed with the target service.
  • the association relationship may include at least one of the following: logging in to the same user account, being in the same device group, or having a friend relationship, etc. This is not limited in the embodiment of the present application.
  • the device management module of the server stores the device address of each device under the user account (reported regularly by each device), and the subscription management module stores the subscription relationship between the service and the device.
  • the device selection module of a device obtains the device address of each candidate device under the current user account that matches the target device name and is deployed with the target service by calling the device management module and subscription management module of the server.
  • the server determines the vehicle computer 1 as a candidate device and sends the device address of the vehicle computer 1 to the smartphone.
  • the first device needs to determine the second device from at least one candidate device.
  • the first device may automatically determine the second device, or determine the second device based on user instructions (that is, manually determine).
  • the second device determines the second device from at least one candidate device based on the target selection strategy.
  • the target selection strategy includes at least one of the following: a distance-based selection strategy (such as determining the candidate device closest to the first device as the second device), a priority-based selection strategy (such as based on a preset Device priority, determine the candidate device with the highest priority as the second device), status-based selection strategy (for example, determine the candidate device currently in use as the second device).
  • a distance-based selection strategy such as determining the candidate device closest to the first device as the second device
  • a priority-based selection strategy such as based on a preset Device priority, determine the candidate device with the highest priority as the second device
  • status-based selection strategy for example, determine the candidate device currently in use as the second device.
  • the server periodically obtains the device status of each device and feeds back the device status together with the device address to the first device.
  • the first device determines the candidate device in use among the candidate devices as the target device.
  • the second device displays a candidate device list, and the candidate device list includes a device identifier of at least one candidate device, so that the second device is determined based on a selection operation on the device identifier in the candidate device list.
  • the first device provides a list of candidate devices for the user to select, and determines at least one candidate device selected by the user as the target device.
  • the first device can also use other solutions (such as an automatic and manual combination solution) to determine the second device, and the embodiments of the present application are not limited to this.
  • the first device generates corresponding service uninstallation requests for each of the determined second devices.
  • the first device combines the device address and the target service name as parameters to form a service uninstallation link.
  • the smartphone generates a service uninstallation request based on the "car machine 1 address” and "video playback service”.
  • Step 903 The first device sends a service uninstallation request to the second device.
  • the first device sends a service uninstallation request to the second device based on the device address of the second device.
  • Step 904 The second device receives the service uninstallation request sent by the first device.
  • the second device receives the service uninstallation request through a service proxy.
  • the second device verifies the service uninstallation request, and further responds to the service uninstallation request after passing the verification.
  • the verification methods include request integrity verification, offload requester verification, parameter compliance verification, etc., which are not limited in the embodiments of this application.
  • the second device after receiving the service uninstallation request, the second device automatically determines whether to accept the request, or determines whether to accept the request based on user instructions. If the request is accepted, step 905 is executed; if the request is not accepted, the process ends (an uninstallation rejection notification may be sent to the first device).
  • Step 905 The second device uninstalls the target service based on the service uninstallation request.
  • the second device first obtains the target service definition information of the target service from the server based on the target service name included in the service uninstallation request, and then based on the target service definition information Uninstall the target service and delete the locally stored target service installation package.
  • the second device when the target service is uninstalled (whether under command control or automatic uninstallation), the second device sends a subscription to the server
  • the cancellation message instructs the server to update the subscription relationship.
  • the server is used to delete the subscription relationship between the second device and the target service based on the subscription cancellation message.
  • the subscription cancellation message includes the device identification of the second device and the target service name of the target service.
  • the service management module 122 calls the service definition management module 131 through the service gateway 135 to obtain the target service definition information corresponding to the target service name. , and then call the service uninstall module 126 through the service life cycle management module 123 to uninstall the target service and delete the target service installation package.
  • the second device 120 further sends a subscription cancellation message to the server 130 so that the subscription management module 133 of the server 130 deletes the subscription relationship between the target service and the second device.
  • the user can instruct the second device to uninstall the service by inputting instructions without requiring the user to manually uninstall, thereby simplifying the service uninstallation process and preventing too many services deployed in the second device from affecting the device's operating performance.
  • the second device uninstalls the target service when the automatic uninstallation conditions are met, wherein the automatic uninstallation conditions include at least one of the following: the number of calls to the target service reaches a threshold, the target service is in the target service It has not been called within the duration and the deployment duration of the target service reaches the duration threshold.
  • the automatic uninstallation condition is set in the service life cycle management module and supports customization.
  • the service life cycle management module in the second device automatically calls the service uninstall module to uninstall the target service; when the target service has not been called within 2 hours, the service in the second device The life cycle management module automatically calls the service uninstall module to uninstall the target service; when the deployment time of the target service reaches 24 hours, the service life cycle management module in the second device automatically calls the service uninstall module to uninstall the target service.
  • the interaction process is taken as an example for schematic explanation, wherein the steps with the first device as the execution subject can be independently implemented as a service invocation method on the first device side, and the steps with the second device as the execution subject can be implemented independently.
  • the steps with the server as the execution subject can be independently implemented as a service invocation method on the server side.
  • FIG. 11 shows a structural block diagram of a service invoking device provided by an embodiment of the present application.
  • the device may include:
  • the instruction identification module 1101 is used to identify the first input instruction and obtain the first instruction identification result
  • Request generation module 1102 configured to generate a service invocation request based on the first instruction recognition result, where the service invocation request is used to request the second device to invoke a target service to perform a target action;
  • Request sending module 1103 configured to send the service invocation request to the second device, so that the second device deploys the target service based on the target service installation package and calls the target service to perform the target action,
  • the target service installation package is obtained from the server.
  • the request generation module 1102 is used for:
  • the request sending module 1103 is used for:
  • the service invocation request is sent to the second device based on the device address of the second device.
  • the request generation module 1102 is used to:
  • the candidate device list includes at least one device identifier of the candidate device; and determine the second device based on a selection operation on the device identifier in the candidate device list.
  • the instruction identification module 1101 is also used to identify the second input instruction to obtain the second instruction identification result;
  • the request generation module 1102 is further configured to generate a service uninstallation request based on the second instruction identification result, where the service uninstallation request is used to request the second device to uninstall the target service;
  • the request sending module 1103 is also configured to send the service uninstallation request to the second device, so that the second device uninstalls the target service.
  • the request generation module 1102 is used to:
  • the candidate device Based on the target device name and target service name included in the second instruction identification result, obtain the device address of at least one candidate device from the server, the candidate device matches the target device name and is deployed with the target Serve;
  • the request sending module 1103 is used for:
  • the service offloading request is sent to the second device based on the device address of the second device.
  • FIG 12 shows a structural block diagram of a service invoking device provided by another embodiment of the present application.
  • the device may include:
  • Request receiving module 1201 configured to receive a service invocation request sent by the first device.
  • the service invocation request is used to request to invoke a target service to perform a target action.
  • the service invocation request is generated by the first device based on a first input instruction.
  • the first instruction recognition result is generated;
  • the installation package acquisition module 1202 is configured to obtain the target service installation package of the target service from the server based on the service invocation request;
  • Service deployment module 1203, configured to deploy the target service based on the target service installation package
  • Execution module 1204 is used to call the target service to execute the target action.
  • the installation package acquisition module 1202 is used for:
  • the target service installation package When it is determined that the target service installation package does not exist locally based on the target service definition information, the target service installation package is obtained from the server based on the target service definition information, and the server stores service definition information. and the corresponding relationship between service installation packages.
  • the device also includes:
  • a message sending module is configured to send a subscription message to the server, and the server is configured to maintain a subscription relationship between the second device and the target service based on the subscription message.
  • the device also includes:
  • a message receiving module configured to receive a service update message sent by the server, which is pushed by the server based on the subscription relationship when the target service installation package is updated;
  • An update module configured to obtain the updated target service installation package from the server based on the service update message.
  • the device also includes:
  • a message sending module configured to send a subscription cancellation message to the server when the target service is uninstalled, and the server is configured to delete the subscription relationship based on the subscription cancellation message.
  • the device also includes:
  • the request receiving module 1201 is also configured to receive a service uninstallation request sent by the first device.
  • the service uninstallation request is used to request the second device to uninstall the target service.
  • the service uninstallation request is sent by the third device.
  • a device is generated based on a second instruction recognition result for the second input instruction;
  • An uninstallation module configured to uninstall the target service based on the service uninstallation request.
  • the uninstall module is used for:
  • the uninstall module is also used for:
  • the target service is uninstalled when the automatic uninstallation conditions are met.
  • the automatic uninstallation conditions include at least one of the following: the number of calls to the target service reaches a threshold, the target service has not been called within the target duration, and the target service has not been called within the target duration.
  • the deployment duration of the target service reaches the duration threshold.
  • FIG. 13 shows a structural block diagram of a computer device provided by an exemplary embodiment of the present application.
  • the computer device 1300 can be implemented as the first device or the second device in each of the above embodiments.
  • Computer device 1300 may include one or more of the following components: processor 1310 and memory 1320.
  • Processor 1310 may include one or more processing cores.
  • the processor 1310 uses various interfaces and lines to connect various parts of the entire computer device 1300, and executes by running or executing instructions, programs, code sets or instruction sets stored in the memory 1320, and calling data stored in the memory 1320.
  • the processor 1310 can use at least one of digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). implemented in hardware form.
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA programmable logic array
  • the processor 1310 can integrate one or more of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU), a neural network processor (Neural-network Processing Unit, NPU), a modem, etc.
  • a central processing unit Central Processing Unit, CPU
  • a graphics processor Graphics Processing Unit, GPU
  • a neural network processor Neural-network Processing Unit, NPU
  • the CPU mainly handles the operating system, user interface and applications
  • the GPU is used to render and draw the content that needs to be displayed on the touch screen
  • the NPU is used to implement artificial intelligence (Artificial Intelligence, AI) functions
  • the modem is used to process Wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 1310 and may be implemented by a separate chip.
  • the memory 1320 may include random access memory (RAM) or read-only memory (Read-Only Memory, ROM). Optionally, the memory 1320 includes non-transitory computer-readable storage medium. Memory 1320 may be used to store instructions, programs, codes, sets of codes, or sets of instructions.
  • the memory 1320 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions, etc., used to implement each method embodiment described below; the storage data area may store data created according to the use of the computer device 1300 (such as audio data, phone book), etc.
  • the computer device 1300 when the computer device 1300 is implemented as the first device, the computer device 1300 is also provided with a voice collection component, which may be a built-in microphone or an external microphone.
  • a voice collection component which may be a built-in microphone or an external microphone.
  • the structure of the computer device 1300 shown in the above figures does not constitute a limitation on the computer device.
  • the computer device may include more or less components than those shown in the figures, or a combination thereof. Certain parts, or different arrangements of parts.
  • the computer device 1300 also includes components such as a display screen, camera components, speakers, radio frequency circuits, input units, sensors (such as acceleration sensors, angular velocity sensors, light sensors, etc.), audio circuits, WiFi modules, power supplies, Bluetooth modules, etc. I won’t go into details here.
  • Embodiments of the present application also provide a computer-readable storage medium that stores at least one program code.
  • the program code is loaded and executed by a processor to implement the service invocation method described in the above embodiments. .
  • Embodiments of the present application provide a computer program product or computer program.
  • the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the service invocation method provided in various optional implementations of the above aspect.

Abstract

Embodiments of the present application disclose a service call method and apparatus, a device and a storage medium, relating to the technical field of computers. The method comprises: a first device recognizing a first input instruction, to obtain a first instruction recognition result (201); generating a service call request on the basis of the first instruction recognition result (202), the service call request being used to request that a second device call a target service to execute a target action; sending the service call request to the second device (203), so as to cause the second device to deploy the target service on the basis of a target service installation package, and call the target service to execute the target action (207), the target service installation package being obtained from a server.

Description

服务调用方法、装置、设备及存储介质Service invocation methods, devices, equipment and storage media
本申请要求于2022年03月30日提交的申请号为202210334389.8、发明名称为“服务调用方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application with application number 202210334389.8 and the invention title "Service Invoking Method, Device, Equipment and Storage Medium" submitted on March 30, 2022, the entire content of which is incorporated into this application by reference. .
技术领域Technical field
本申请实施例涉及计算机技术领域,特别涉及一种服务调用方法、装置、设备及存储介质。The embodiments of the present application relate to the field of computer technology, and in particular to a service invoking method, device, equipment and storage medium.
背景技术Background technique
指令控制是一种通过对用户指令进行识别分析,并根据识别分析结果控制设备执行相应操作的技术。常见的指令控制包括手势控制和语音控制等等。Command control is a technology that recognizes and analyzes user commands and controls the device to perform corresponding operations based on the recognition and analysis results. Common command controls include gesture control, voice control, etc.
相关技术中,计算机设备需要具备指令识别功能,且需要预先部署相应的服务后,才能实现指令控制功能。比如,车载终端具有语音识别且部署有视频播放功能时,才能根据用户发出的语音指令进行视频播放。In related technologies, computer equipment needs to have a command recognition function, and corresponding services need to be pre-deployed before the command control function can be realized. For example, only when the vehicle-mounted terminal has speech recognition and is equipped with a video playback function, the video can be played according to the voice instructions issued by the user.
发明内容Contents of the invention
本申请实施例提供了一种服务调用方法、装置、设备及存储介质。所述技术方案如下:Embodiments of the present application provide a service invoking method, device, equipment and storage medium. The technical solutions are as follows:
一方面,本申请实施例提供了一种服务调用方法,所述方法由第一设备执行,所述方法包括:On the one hand, embodiments of the present application provide a service invoking method, which is executed by a first device. The method includes:
对第一输入指令进行识别,得到第一指令识别结果;Recognize the first input instruction and obtain the first instruction recognition result;
基于所述第一指令识别结果生成服务调用请求,所述服务调用请求用于请求第二设备调用目标服务以执行目标动作;Generate a service call request based on the first instruction recognition result, the service call request is used to request the second device to call the target service to perform the target action;
向所述第二设备发送所述服务调用请求,以使所述第二设备基于目标服务安装包部署所述目标服务并调用所述目标服务执行所述目标动作,所述目标服务安装包从服务器获得。Send the service invocation request to the second device, so that the second device deploys the target service based on the target service installation package and calls the target service to perform the target action, and the target service installation package is downloaded from the server get.
另一方面,本申请实施例提供了一种服务调用方法,所述方法由第二设备执行,所述方法包括:On the other hand, embodiments of the present application provide a service invoking method, which is executed by a second device. The method includes:
接收第一设备发送的服务调用请求,所述服务调用请求用于请求调用目标服务以执行目标动作,所述服务调用请求由所述第一设备基于对第一输入指令的第一指令识别结果生成;Receive a service invocation request sent by the first device, the service invocation request is used to request to call a target service to perform a target action, the service invocation request is generated by the first device based on the first instruction recognition result of the first input instruction. ;
基于所述服务调用请求从服务器处获取所述目标服务的目标服务安装包;Obtain the target service installation package of the target service from the server based on the service invocation request;
基于所述目标服务安装包部署所述目标服务;Deploy the target service based on the target service installation package;
调用所述目标服务执行所述目标动作。Call the target service to perform the target action.
另一方面,本申请实施例提供了一种服务调用装置,所述装置包括:On the other hand, embodiments of the present application provide a service invoking device, which includes:
指令识别模块,用于对第一输入指令进行识别,得到第一指令识别结果;An instruction identification module, used to identify the first input instruction and obtain the first instruction identification result;
请求生成模块,用于基于所述第一指令识别结果生成服务调用请求,所述服务调用请求用于请求第二设备调用目标服务以执行目标动作;A request generation module, configured to generate a service invocation request based on the first instruction recognition result, the service invocation request being used to request the second device to invoke the target service to perform the target action;
请求发送模块,用于向所述第二设备发送所述服务调用请求,以使所述第二设备基于目标服务安装包部署所述目标服务,并调用所述目标服务执行所述目标动作,所述目标服务安装包从服务器获得。A request sending module, configured to send the service invocation request to the second device, so that the second device deploys the target service based on the target service installation package and calls the target service to perform the target action, so The above target service installation package is obtained from the server.
另一方面,本申请实施例提供了一种服务调用装置,所述装置包括:On the other hand, embodiments of the present application provide a service invoking device, which includes:
请求接收模块,用于接收第一设备发送的服务调用请求,所述服务调用请求用于请求调用目标服务以执行目标动作,所述服务调用请求由所述第一设备基于对第一输入指令的第一指令识别结果生成;A request receiving module, configured to receive a service invocation request sent by the first device. The service invocation request is used to request the invocation of a target service to perform a target action. The service invocation request is generated by the first device based on a response to a first input instruction. The first instruction recognition result is generated;
安装包获取模块,用于基于所述服务调用请求从服务器处获取所述目标服务的目标服务安装包;An installation package acquisition module, configured to obtain the target service installation package of the target service from the server based on the service invocation request;
服务部署模块,用于基于所述目标服务安装包部署所述目标服务;A service deployment module, configured to deploy the target service based on the target service installation package;
执行模块,用于调用所述目标服务执行所述目标动作。An execution module is used to call the target service to execute the target action.
另一方面,本申请实施例提供了一种计算机设备,所述计算机设备包括处理器和存储器;所述存储器存储有至少一条指令,所述至少一条指令用于被所述处理器执行以实现如上述方面所述的服务调用方法。On the other hand, embodiments of the present application provide a computer device. The computer device includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the following: The service calling method described in the above aspects.
另一方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一条程序代码,所述程序代码由处理器加载并执行以实现如上述方面所述的服务调用方法。On the other hand, embodiments of the present application provide a computer-readable storage medium in which at least one program code is stored, and the program code is loaded and executed by a processor to implement the above aspects. service calling method.
另一方面,本申请实施例提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方面的各种可选实现方式中提供的服务调用方法。On the other hand, embodiments of the present application provide a computer program product or computer program. The computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the service invocation method provided in various optional implementations of the above aspect.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative efforts.
图1示出了本申请一个示例性实施例提供的服务调用系统的系统架构图;Figure 1 shows a system architecture diagram of a service invocation system provided by an exemplary embodiment of the present application;
图2示出了本申请一个示例性实施例提供的服务调用方法的流程图;Figure 2 shows a flow chart of a service invoking method provided by an exemplary embodiment of the present application;
图3示出了本申请一个示例性实施例提供的服务调用方法的实施示意图;Figure 3 shows a schematic implementation diagram of a service invoking method provided by an exemplary embodiment of the present application;
图4示出了本申请一个示例性实施例提供的服务定义及安装包上传过程的实施示意图;Figure 4 shows a schematic diagram of the service definition and installation package upload process provided by an exemplary embodiment of the present application;
图5示出了本申请另一个示例性实施例提供的服务调用方法的流程图;Figure 5 shows a flow chart of a service invoking method provided by another exemplary embodiment of the present application;
图6示出了本申请一个示例性实施例提供的文本解析过程的流程图;Figure 6 shows a flow chart of a text parsing process provided by an exemplary embodiment of the present application;
图7示出了本申请一个示例性实施例示提供的服务动态部署过程的实施示意图;Figure 7 shows a schematic diagram of the implementation of the service dynamic deployment process provided by an exemplary embodiment of the present application;
图8示出了本申请一个示例性实施例提供的服务更新过程的实施示意图;Figure 8 shows an implementation schematic diagram of the service update process provided by an exemplary embodiment of the present application;
图9示出了本申请一个示例性实施例提供的服务卸载过程的流程图;Figure 9 shows a flow chart of the service offloading process provided by an exemplary embodiment of the present application;
图10示出了本申请一个示例性实施例提供的服务卸载过程的实施示意图;Figure 10 shows a schematic diagram of the implementation of the service offloading process provided by an exemplary embodiment of the present application;
图11示出了本申请一个实施例提供的服务调用装置的结构框图;Figure 11 shows a structural block diagram of a service invoking device provided by an embodiment of the present application;
图12示出了本申请另一个实施例提供的服务调用装置的结构框图;Figure 12 shows a structural block diagram of a service invoking device provided by another embodiment of the present application;
图13示出了本申请一个示例性实施例提供的计算机设备的结构方框图。Figure 13 shows a structural block diagram of a computer device provided by an exemplary embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
为了方便理解,下面对本申请实施例中涉及的名词进行说明。To facilitate understanding, the terms involved in the embodiments of this application are described below.
服务:用于实现特定任务的最小单元。比如,截屏服务用于实现设备截屏功能、视频播放服务用于进行视频播放等等。并且,进行服务调用时,设备可以调用本地部署的服务,也可以调用其他设备上部署的服务(即跨端调用)。比如,第一设备可以调用本地的视频播放服务进行视频播放,也可以调用第二设备的视频播放服务,从而在第二设备上实现视频播放。Service: The smallest unit used to implement a specific task. For example, the screen capture service is used to implement the device screen capture function, the video playback service is used for video playback, and so on. Moreover, when making service calls, the device can call services deployed locally or services deployed on other devices (i.e., cross-end calls). For example, the first device can call the local video playback service to play the video, or can call the video playback service of the second device to realize video playback on the second device.
不同于传统服务需要预先部署(若未部署则无法实现相应的功能),本申请实施例中涉及的服务支持动态部署。在收到服务调用请求的情况下,若本地部署有相应的服务,则直接调用;若本地未部署相应的服务,则可以动态获取服务安装包,并基于服务安装包完成服务部署。此外,不同于传统服务需要手动安装或卸载,本申请实施例中的服务支持自动卸载,简 化了服务安装以及卸载的操作流程。Unlike traditional services that require pre-deployment (if not deployed, corresponding functions cannot be implemented), the services involved in the embodiments of this application support dynamic deployment. When receiving a service invocation request, if the corresponding service is deployed locally, it will be called directly; if the corresponding service is not deployed locally, the service installation package can be obtained dynamically, and the service deployment is completed based on the service installation package. In addition, unlike traditional services that require manual installation or uninstallation, the service in the embodiment of the present application supports automatic uninstallation, which simplifies the service installation and uninstallation operation process.
在一些实施例中,服务可以包括静态服务和动态服务,其中,静态服务指由宿主应用提供的服务,需要预安装在设备中,而动态服务则是指支持动态部署的服务,可以在调用过程中动态部署在设备中。可选的,该动态服务的服务安装包存储在服务器中,设备可以从服务器处下载服务安装包。In some embodiments, services may include static services and dynamic services. Static services refer to services provided by host applications and need to be pre-installed in the device, while dynamic services refer to services that support dynamic deployment and can be used during the calling process. Dynamically deployed in the device. Optionally, the service installation package of the dynamic service is stored in the server, and the device can download the service installation package from the server.
图1示出了本申请一个示例性实施例提供的服务调用系统的系统结构图,该系统中包括第一设备110、第二设备120以及服务器130。Figure 1 shows a system structure diagram of a service invocation system provided by an exemplary embodiment of the present application. The system includes a first device 110, a second device 120 and a server 130.
第一设备110是具有指令识别功能的电子设备。该指令识别功能可以是语音识别功能、手势识别功能、文本识别功能等等,该电子设备可以是智能手机、平板电脑、可穿戴式设备、个人计算机、车载终端等等,本实施对此不作限定。The first device 110 is an electronic device with an instruction recognition function. The instruction recognition function may be a voice recognition function, a gesture recognition function, a text recognition function, etc., and the electronic device may be a smartphone, a tablet computer, a wearable device, a personal computer, a vehicle-mounted terminal, etc. This implementation does not limit this .
在一些实施例中,借助该语音识别功能,第一设备110可以通过语音识别模块111将输入语音转换为语音文本,并通过文本解析模块112对语音文本进行解析,得到语音识别结果(用于表征用户的意图)。In some embodiments, with the help of the speech recognition function, the first device 110 can convert the input speech into speech text through the speech recognition module 111, and parse the speech text through the text parsing module 112 to obtain a speech recognition result (used to characterize user intent).
进一步的,当语音识别结果指示调用外部设备的服务,以使外部设备执行特定动作时,第一设备110通过设备选择模块113确定所需调用的外部设备(即图中的第二设备120),并基于语音识别结果生成服务调用请求,从而向外部设备发送服务调用请求。其中,外部设备的数量为至少一个。Further, when the voice recognition result indicates that the service of the external device is called so that the external device performs a specific action, the first device 110 determines the external device that needs to be called (ie, the second device 120 in the figure) through the device selection module 113, And generate a service call request based on the speech recognition result, thereby sending the service call request to the external device. The number of external devices is at least one.
第二设备120是支持动态部署服务的电子设备,该电子设备可以是智能手机、平板电脑、可穿戴式设备、个人计算机、车载终端等等,本实施对此不作限定。The second device 120 is an electronic device that supports dynamic deployment services. The electronic device may be a smartphone, a tablet, a wearable device, a personal computer, a vehicle-mounted terminal, etc., which is not limited in this implementation.
在一些实施例中,第二设备120中设置有服务代理121,当通过服务代理121接收到第一设备110发送的服务调用请求时,首先通过服务管理模块122,查询本地是否部署有服务调用请求所指示的第一服务。服务生命周期管理模块123用于管理设备中各服务的生命周期,若部署有该目标服务,服务生命周期管理模块123则控制服务执行模块125调用目标服务执行特定动作。若未部署该目标服务,服务管理模块122即从服务器130处下载目标服务对应的服务安装包,并存储在本地;服务安装模块124在服务生命周期管理模块123的控制下,根据服务安装包部署目标服务。服务生命周期管理模块123除了负责控制服务安装和执行外,还会根据策略,控制服务卸载模块126对已部署的服务进行卸载,避免设备部署过多服务。In some embodiments, the second device 120 is provided with a service proxy 121. When the service proxy 121 receives the service invocation request sent by the first device 110, it first queries through the service management module 122 whether there is a service invocation request deployed locally. First service as indicated. The service life cycle management module 123 is used to manage the life cycle of each service in the device. If the target service is deployed, the service life cycle management module 123 controls the service execution module 125 to call the target service to perform specific actions. If the target service is not deployed, the service management module 122 downloads the service installation package corresponding to the target service from the server 130 and stores it locally; the service installation module 124, under the control of the service life cycle management module 123, deploys according to the service installation package target service. In addition to controlling service installation and execution, the service life cycle management module 123 also controls the service uninstall module 126 to uninstall deployed services according to policies to avoid deploying too many services on the device.
服务器130是一台服务器、若干台服务器构成的服务集群或云计算中心。根据所实现功能进行划分,服务器130中包括服务定义管理模块131、服务安装包管理模块132、订阅管理模块133以及设备管理模块134以及服务网关135。The server 130 is a server, a service cluster or a cloud computing center composed of several servers. Divided according to the functions implemented, the server 130 includes a service definition management module 131, a service installation package management module 132, a subscription management module 133, a device management module 134 and a service gateway 135.
服务网关135作为外部设备与服务器交互的入口,用于将接入的流量动态路由至指定的管理模块。The service gateway 135 serves as an entrance for interaction between external devices and servers, and is used to dynamically route incoming traffic to designated management modules.
服务定义管理模块131用于管理开发者所开发服务的服务定义信息,并将服务定义信息关联到相应的服务安装包,以便后续基于服务定义信息获取对应的服务安装包。The service definition management module 131 is used to manage the service definition information of the service developed by the developer, and associate the service definition information with the corresponding service installation package, so that the corresponding service installation package can be subsequently obtained based on the service definition information.
服务安装包管理模块132用于管理开发者所开发服务的服务安装包,并将服务安装包存储在文件仓库中。The service installation package management module 132 is used to manage service installation packages of services developed by developers, and store the service installation packages in the file warehouse.
订阅管理模块123用于管理设备与服务之间的订阅关系,以便后续基于订阅关系控制设备进行服务更新。The subscription management module 123 is used to manage the subscription relationship between the device and the service, so as to subsequently control the device to perform service updates based on the subscription relationship.
设备管理模块134用于管理账号与设备之间的绑定关系,以及各个设备的设备状态,为第一设备110侧的设备选择模块113提供设备选择依据。The device management module 134 is used to manage the binding relationship between accounts and devices, as well as the device status of each device, and provide device selection basis for the device selection module 113 on the first device 110 side.
需要说明的是,上述实施例仅对服务调用系统的基础架构进行了说明,该系统中还可以包括其他计算机设备(比如开发者设备)或实现其他功能的服务器,本实施例并不对此构成限定。It should be noted that the above embodiment only describes the infrastructure of the service invocation system. The system may also include other computer equipment (such as developer equipment) or servers that implement other functions. This embodiment does not constitute a limitation on this. .
请参考图2,其示出了本申请一个示例性实施例提供的服务调用方法的流程图,本申请 实施例以该方法应用于图1所示的服务调用系统为例进行说明,该方法包括:Please refer to Figure 2, which shows a flow chart of a service invocation method provided by an exemplary embodiment of the present application. This embodiment of the present application takes the application of this method to the service invocation system shown in Figure 1 as an example. The method includes :
步骤201,第一设备对第一输入指令进行识别,得到第一指令识别结果。Step 201: The first device recognizes the first input command and obtains the first command recognition result.
可选的,第一输入指令可以为语音指令、手势指令或文本指令等等,本申请实施例对输入指令的形式并不进行限定。Optionally, the first input instruction may be a voice instruction, a gesture instruction, a text instruction, etc. The embodiment of the present application does not limit the form of the input instruction.
在一些实施例中,第一设备具有语音采集功能,当通过麦克风等语音采集设备采集到第一输入语音时,第一设备即对第一输入语音进行语音识别,得到第一语音识别结果,该第一语音识别结果即用于表征语音控制意图。关于语音识别的过程,在一种可能的实施方式中,第一设备首先将输入语音转换为语音文本,然后对语音文本进行解析,将生成服务调用请求所需的参数确定为语音识别结果。In some embodiments, the first device has a voice collection function. When the first input voice is collected through a voice collection device such as a microphone, the first device performs voice recognition on the first input voice to obtain the first voice recognition result. The first speech recognition result is used to characterize the speech control intention. Regarding the speech recognition process, in a possible implementation, the first device first converts the input speech into speech text, then parses the speech text, and determines the parameters required to generate the service call request as the speech recognition result.
在另一些实施例中,第一设备具有图像采集功能,当通过摄像头等图像采集设备采集到第一手势时,第一设备即对第一手势进行手势识别,从而基于手势与控制指令之间的映射关系,得到第一手势识别结果,该第一手势识别结果用于表征手势所表征的控制意图。In other embodiments, the first device has an image acquisition function. When the first gesture is acquired through an image acquisition device such as a camera, the first device performs gesture recognition on the first gesture, thereby based on the interaction between the gesture and the control instruction. The mapping relationship is used to obtain a first gesture recognition result, and the first gesture recognition result is used to represent the control intention represented by the gesture.
在另一些实施例中,第一设备具有文本输入功能,当通过文本输入组件获取到用户输入的第一输入文本时,第一设备即对第一输入文本进行识别,得到第一文本识别结果,该第一文本识别结果用于表征输入文本的控制意图。In other embodiments, the first device has a text input function. When the first input text input by the user is obtained through the text input component, the first device recognizes the first input text and obtains the first text recognition result. The first text recognition result is used to characterize the control intention of the input text.
可选的,第一指令识别结果中包含生成服务调用请求所需的参数。Optionally, the first instruction recognition result includes parameters required to generate a service invocation request.
步骤202,第一设备基于第一指令识别结果生成服务调用请求。Step 202: The first device generates a service invocation request based on the first instruction recognition result.
其中,该服务调用请求用于请求第二设备调用目标服务以执行目标动作。Wherein, the service invocation request is used to request the second device to invoke the target service to perform the target action.
在一种可能的实施方式中,该服务调用请求可以为服务调用url,本申请实施例并不对服务调用请求的具体形式进行限定。In a possible implementation, the service invocation request may be a service invocation URL. The embodiment of this application does not limit the specific form of the service invocation request.
示意性的,如图3所示,智能手机31基于“在车机上播放xxx视频”的语音识别结果,生成服务调用请求,该服务调用请求用于请求车机调用视频播放服务以播放xxx视频。Schematically, as shown in Figure 3, the smartphone 31 generates a service call request based on the speech recognition result of "play xxx video on the car machine". The service call request is used to request the car machine to call the video playback service to play the xxx video.
步骤203,第一设备向第二设备发送服务调用请求。Step 203: The first device sends a service invocation request to the second device.
在一种可能的实施方式中,第一设备在确定出所需调用的第二设备后,获取第二设备的设备地址,从而基于该设备地址向第二设备发送服务调用请求。In a possible implementation, after determining the second device that needs to be called, the first device obtains the device address of the second device, and then sends a service invocation request to the second device based on the device address.
在一些实施例中,当第二设备的数量为至少两个时,第一设备向各个第二设备发送服务调用请求,其中,不同第二设备对应不同服务调用请求(请求中部分参数存在差异,但均用于调用相同服务执行相同动作)。In some embodiments, when the number of second devices is at least two, the first device sends a service invocation request to each second device, where different second devices correspond to different service invocation requests (some parameters in the requests are different, But they are all used to call the same service to perform the same action).
示意性的,如图3所示,智能手机31向车机32发送服务调用请求。Schematically, as shown in Figure 3, the smart phone 31 sends a service invocation request to the car machine 32.
步骤204,第二设备接收第一设备发送的服务调用请求。Step 204: The second device receives the service invocation request sent by the first device.
在一种可能的实施方式中,第二设备通过服务代理接收该服务调用请求。In a possible implementation, the second device receives the service invocation request through a service proxy.
在一些实施例中,第二设备对该服务调用请求进行校验,并在通过校验后进一步响应该服务调用请求。其中,校验方式包括请求完整性校验、调用请求方校验以及参数合规校验等等,本申请实施例对此不作限定。In some embodiments, the second device verifies the service invocation request, and further responds to the service invocation request after passing the verification. The verification methods include request integrity verification, call requester verification, parameter compliance verification, etc., which are not limited in the embodiments of this application.
可选的,第二设备接收到服务调用请求后,自动确定是否接受该请求,或者,基于用户指示确定是否接受该请求。若接受该请求,则执行步骤205;若不接受该请求,则结束流程(可以向第一设备发送拒绝调用通知)。Optionally, after receiving the service invocation request, the second device automatically determines whether to accept the request, or determines whether to accept the request based on user instructions. If the request is accepted, step 205 is executed; if the request is not accepted, the process ends (a call rejection notification may be sent to the first device).
步骤205,第二设备基于服务调用请求从服务器处获取目标服务的目标服务安装包。Step 205: The second device obtains the target service installation package of the target service from the server based on the service invocation request.
在一种可能的实施方式中,第二设备检测是否部署有服务调用请求所指示的目标服务。若部署有目标服务,则进行服务调用;若未部署目标服务,则首先需要进行目标服务的动态部署。In a possible implementation, the second device detects whether the target service indicated by the service invocation request is deployed. If the target service is deployed, the service call is made; if the target service is not deployed, the target service needs to be dynamically deployed first.
在动态部署目标服务时,第二设备首先从服务器处获取目标服务的目标服务器安装包。其中,服务器处设置有文件仓库,该文件仓库中包含实现不同功能,且支持动态部署的动态服务的服务安装包。When dynamically deploying the target service, the second device first obtains the target server installation package of the target service from the server. Among them, the server is provided with a file warehouse, which contains service installation packages for dynamic services that implement different functions and support dynamic deployment.
关于服务器中服务的来源,在一种可能的实施方式中,该服务支持由开发者开发并上传 至服务器。Regarding the source of services in the server, in one possible implementation, the service support is developed by developers and uploaded to the server.
如图4所示,开发者通过服务器130的服务网关135调用服务安装包管理模块132的上传接口,将服务安装包上传至服务器130。上传成功的服务安装包与唯一安装包标识关联并保存在文件仓库中,服务安装包管理模块132向开发者反馈该安装包标识。As shown in FIG. 4 , the developer calls the upload interface of the service installation package management module 132 through the service gateway 135 of the server 130 to upload the service installation package to the server 130 . The successfully uploaded service installation package is associated with a unique installation package identification and stored in the file warehouse. The service installation package management module 132 feeds back the installation package identification to the developer.
进一步的,开发者将服务的服务定义信息关联到安装包标识,然后通过服务网关135调用服务定义管理模块131的上传接口,将服务定义信息保存在服务器130中。Further, the developer associates the service definition information of the service with the installation package identifier, and then calls the upload interface of the service definition management module 131 through the service gateway 135 to save the service definition information in the server 130 .
在一种可能的实施方式中,第二设备向服务器发送安装包获取请求,服务器的服务网关接收到该请求后,将请求路由至服务安装包管理模块,并从文件仓库中获取目标服务安装包,从而将目标服务安装包反馈给第二设备。In a possible implementation, the second device sends an installation package acquisition request to the server. After receiving the request, the service gateway of the server routes the request to the service installation package management module and obtains the target service installation package from the file warehouse. , thereby feeding back the target service installation package to the second device.
示意性的,如图3所示,当未部署视频播放服务时,车机32从服务器33处下载视频播放服务安装包。Schematically, as shown in FIG. 3 , when the video playback service is not deployed, the car machine 32 downloads the video playback service installation package from the server 33 .
步骤206,第二设备基于目标服务安装包部署目标服务。Step 206: The second device deploys the target service based on the target service installation package.
在一种可能的实施方式中,第二设备对获取到的目标服务安装包进行校验,并在通过校验后基于目标服务安装包进行目标服务的动态部署。In a possible implementation, the second device verifies the obtained target service installation package, and after passing the verification, dynamically deploys the target service based on the target service installation package.
步骤207,第二设备调用目标服务执行目标动作。Step 207: The second device calls the target service to perform the target action.
进一步的,第二设备确定服务调用请求所指示的目标动作,从而调用目标服务以执行该目标动作。Further, the second device determines the target action indicated by the service invocation request, and thereby calls the target service to perform the target action.
示意性的,如图3所示,车机32确定目标动作为“播放xxx视频”,从而调用视频播放服务播放xxx视频。Schematically, as shown in Figure 3, the vehicle computer 32 determines that the target action is "play xxx video", thereby calling the video playback service to play the xxx video.
从图3所示的实施例可以明显看出,在车机不具有语音控制功能的情况下,也可以由具有语音识别功能的智能手机作为调度中心,实现对车机内服务的语音调用;在车机具备语音控制功能的情况下,能够避免车机频繁进行语音识别时对其他服务造成的影响(车机的性能通常低于智能手机的性能,且车机需要实时调用与车辆行驶相关的重要服务)。此外,车机能够在接收到服务调用请求的情况下动态部署服务,能够避免预先进行服务部署造成的内容占用(尤其是一些使用频率较低的服务)。It can be clearly seen from the embodiment shown in Figure 3 that when the vehicle machine does not have a voice control function, a smartphone with a voice recognition function can also be used as a dispatch center to realize voice calls to in-car services; in When the car machine has a voice control function, it can avoid the impact on other services when the car machine frequently performs voice recognition (the performance of the car machine is usually lower than that of a smartphone, and the car machine needs to call important functions related to vehicle driving in real time. Serve). In addition, the vehicle machine can dynamically deploy services after receiving a service call request, which can avoid content occupation caused by pre-deployment of services (especially some services with low frequency of use).
综上所述,本申请实施例中,由具备指令识别功能的第一设备对输入指令进行识别,并基于指令识别结果向第二设备发送服务调用请求,指示第二设备调用目标服务以执行目标动作,使第二设备能够基于该服务调用请求从服务器处获取目标服务安装包并部署目标服务,从而调用目标服务执行目标动作。采用本申请实施例提供的方案,即便第二设备不具备指令识别功能,也能实现基于指令的服务调用,且第二设备可以基于服务调用请求实现目标服务的动态部署,避免预先部署大量服务造成的内存占用。To sum up, in the embodiment of the present application, the first device with the command recognition function recognizes the input command, and sends a service invocation request to the second device based on the command recognition result, instructing the second device to call the target service to execute the target. The action enables the second device to obtain the target service installation package from the server and deploy the target service based on the service invocation request, thereby calling the target service to perform the target action. Using the solution provided by the embodiments of this application, even if the second device does not have the command recognition function, service invocation based on instructions can be realized, and the second device can dynamically deploy the target service based on the service invocation request, avoiding the problem of pre-deployment of a large number of services. memory usage.
可选的,基于第一指令识别结果生成服务调用请求,包括:Optionally, generate a service invocation request based on the first instruction recognition result, including:
基于第一指令识别结果中包含的目标设备名称,从服务器处获取至少一个候选设备的设备地址,候选设备符合目标设备名称;Based on the target device name included in the first instruction recognition result, obtain the device address of at least one candidate device from the server, and the candidate device matches the target device name;
从至少一个候选设备中确定出第二设备;determining a second device from at least one candidate device;
基于第二设备的设备地址、第一指令识别结果中包含的目标服务名称以及目标动作名称,生成服务调用请求;Generate a service invocation request based on the device address of the second device, the target service name and the target action name contained in the first instruction recognition result;
向第二设备发送服务调用请求,包括:Send a service call request to the second device, including:
基于第二设备的设备地址,向第二设备发送服务调用请求。Based on the device address of the second device, a service invocation request is sent to the second device.
可选的,基于第一指令识别结果生成服务调用请求,包括:Optionally, generate a service invocation request based on the first instruction recognition result, including:
基于第一指令识别结果中包含的目标设备名称,从服务器处获取至少一个候选设备的设备地址,候选设备符合目标设备名称;Based on the target device name included in the first instruction recognition result, obtain the device address of at least one candidate device from the server, and the candidate device matches the target device name;
从至少一个候选设备中确定出第二设备;determining a second device from at least one candidate device;
基于第二设备的设备地址、第一指令识别结果中包含的目标服务名称以及目标动作名称, 生成服务调用请求;Generate a service invocation request based on the device address of the second device, the target service name and the target action name contained in the first instruction recognition result;
向第二设备发送服务调用请求,包括:Send a service call request to the second device, including:
基于第二设备的设备地址,向第二设备发送服务调用请求。Based on the device address of the second device, a service invocation request is sent to the second device.
可选的,该方法还包括:Optionally, this method also includes:
对第二输入指令进行识别,得到第二指令识别结果;Recognize the second input instruction and obtain the second instruction recognition result;
基于第二指令识别结果生成服务卸载请求,服务卸载请求用于请求第二设备卸载目标服务;Generate a service uninstallation request based on the second instruction recognition result, and the service uninstallation request is used to request the second device to uninstall the target service;
向第二设备发送服务卸载请求,以使第二设备卸载目标服务。Send a service uninstallation request to the second device, so that the second device uninstalls the target service.
可选的,基于第二指令识别结果生成服务卸载请求,包括:Optionally, generate a service uninstallation request based on the second instruction recognition result, including:
基于第二指令识别结果中包含的目标设备名称以及目标服务名称,从服务器处获取至少一个候选设备的设备地址,候选设备符合目标设备名称,且部署有目标服务;Based on the target device name and the target service name included in the second instruction recognition result, obtain the device address of at least one candidate device from the server, the candidate device matches the target device name and is deployed with the target service;
从至少一个候选设备中确定出第二设备;determining a second device from at least one candidate device;
基于第二设备的设备地址以及目标服务名称,生成服务卸载请求;Generate a service uninstallation request based on the device address of the second device and the target service name;
向第二设备发送服务卸载请求,包括:Send a service uninstallation request to the second device, including:
基于第二设备的设备地址,向第二设备发送服务卸载请求。Based on the device address of the second device, a service uninstallation request is sent to the second device.
可选的,基于服务调用请求从服务器处获取目标服务的目标服务安装包,包括:Optionally, obtain the target service installation package of the target service from the server based on the service call request, including:
基于服务调用请求中包含的目标服务名称,从服务器处获取目标服务的目标服务定义信息;Based on the target service name included in the service call request, obtain the target service definition information of the target service from the server;
在基于目标服务定义信息确定本地不存在目标服务安装包的情况下,基于目标服务定义信息从服务器处获取目标服务安装包,服务器存储有服务定义信息和服务安装包之间的对应关系。When it is determined that the target service installation package does not exist locally based on the target service definition information, the target service installation package is obtained from the server based on the target service definition information. The server stores the correspondence between the service definition information and the service installation package.
可选的,该方法还包括:Optionally, this method also includes:
向服务器发送订阅消息,服务器用于基于订阅消息维护第二设备与目标服务之间的订阅关系。A subscription message is sent to the server, and the server is used to maintain the subscription relationship between the second device and the target service based on the subscription message.
可选的,该方法还包括:Optionally, this method also includes:
接收服务器发送的服务更新消息,服务更新消息在目标服务安装包更新的情况下由服务器基于订阅关系推送;Receive service update messages sent by the server. The service update messages are pushed by the server based on the subscription relationship when the target service installation package is updated;
基于服务更新消息从服务器处获取更新后的目标服务安装包。Obtain the updated target service installation package from the server based on the service update message.
可选的,该方法还包括:Optionally, this method also includes:
在目标服务被卸载的情况下,向服务器发送订阅取消消息,服务器用于基于订阅取消消息删除订阅关系。When the target service is uninstalled, a subscription cancellation message is sent to the server, and the server is used to delete the subscription relationship based on the subscription cancellation message.
可选的,该方法还包括:Optionally, this method also includes:
接收第一设备发送的服务卸载请求,服务卸载请求用于请求第二设备卸载目标服务,服务卸载请求由第一设备基于对第二输入指令的第二指令识别结果生成;Receive a service uninstallation request sent by the first device, the service uninstallation request is used to request the second device to uninstall the target service, and the service uninstallation request is generated by the first device based on the second instruction recognition result of the second input instruction;
基于服务卸载请求卸载目标服务。Uninstall the target service based on the service uninstallation request.
可选的,基于服务卸载请求卸载目标服务,包括:Optional, uninstall target services based on service uninstallation requests, including:
基于服务卸载请求中包含的目标服务名称,从服务器处获取目标服务的目标服务定义信息;Based on the target service name included in the service uninstallation request, obtain the target service definition information of the target service from the server;
基于目标服务定义信息卸载目标服务,并删除本地存储的目标服务安装包。Uninstall the target service based on the target service definition information, and delete the locally stored target service installation package.
可选的,该方法还包括:Optionally, this method also includes:
在满足自动卸载条件的情况下,卸载目标服务,自动卸载条件包括如下至少一种:目标服务的调用次数达到次数阈值、目标服务在目标时长内未被调用以及目标服务的部署时长达到时长阈值。The target service is uninstalled when the automatic uninstallation conditions are met. The automatic uninstallation conditions include at least one of the following: the number of calls to the target service reaches the number threshold, the target service is not called within the target duration, and the deployment duration of the target service reaches the duration threshold.
请参考图5,其示出了本申请另一个示例性实施例提供的服务调用方法的流程图,本申 请实施例以该方法应用于图1所示的服务调用系统为例进行说明,该方法包括:Please refer to Figure 5, which shows a flow chart of a service invocation method provided by another exemplary embodiment of the present application. This embodiment of the present application takes the application of this method to the service invocation system shown in Figure 1 as an example to illustrate the method. include:
步骤501,第一设备对第一输入指令进行识别,得到第一指令识别结果。Step 501: The first device recognizes the first input command and obtains the first command recognition result.
可选的,第一指令识别结果中包含所需调用设备的目标设备名称、所需调用目标服务的目标服务名称以及目标动作的目标动作名称。Optionally, the first instruction identification result includes the target device name of the device to be called, the target service name of the target service to be called, and the target action name of the target action.
在一种可能的实施方式中,如图6所示,第一设备中首先进行文本解析预配置,从而在应用过程中基于预配置内容进行文本解析。In a possible implementation, as shown in FIG. 6 , text parsing is first pre-configured in the first device, so that text parsing is performed based on the pre-configured content during the application process.
其中,文本解析预配置过程中配置的内容包括意图词典、意图槽位、意图语料以及意图回复。Among them, the content configured during the text parsing preconfiguration process includes intent dictionary, intent slot, intent corpus, and intent reply.
其中,意图词典中包含以主词作为key,一组同义词列表作为值的键值对。比如,配置有三个意图词典,意图词典1的key为设备名称,value为该设备名称的同义词列表(例如key为车机,valve为车载终端、行车电脑等等);意图词典2的key为所需调用服务的服务名称,value为该服务名称的同义词列表(例如key为视频播放服务,value为打开、放映等等);意图词典3的key为所需执行动作的动作名称,value为动作名称对应的同义词列表。Among them, the intent dictionary contains key-value pairs with the subject word as the key and a set of synonym lists as the value. For example, there are three intent dictionaries configured. The key of intent dictionary 1 is the device name, and the value is the synonym list of the device name (for example, the key is the car machine, the valve is the vehicle terminal, the driving computer, etc.); the key of intent dictionary 2 is the device name. The service name of the service that needs to be called, and the value is the synonym list of the service name (for example, the key is the video playback service, and the value is open, show, etc.); the key of the intent dictionary 3 is the action name of the required action, and the value is the action name. Corresponding synonym list.
意图槽位为预配置的占位符变量,每个意图槽位对应唯一一个意图词典。比如,配置有三个意图槽位,意图槽位1的变量为var1,对应意图词典1;意图槽位2的变量为var2,对应意图词典2;意图槽位3的变量为var3,对应意图词典3。Intent slots are preconfigured placeholder variables, and each intent slot corresponds to a unique intent dictionary. For example, if there are three intent slots configured, the variable in intent slot 1 is var1, which corresponds to intent dictionary 1; the variable in intent slot 2 is var2, which corresponds to intent dictionary 2; the variable in intent slot 3 is var3, which corresponds to intent dictionary 3. .
意图语料一般为语气前缀+意图词典中主词或同义词+语气后缀或者其语法变种,可以支持规则类语料和不规则类语料,比如,配置一个规则类语料以及多个非规则类语料:Intent corpus is generally modal prefix + subject or synonym in the intent dictionary + modal suffix or its grammatical variant. It can support regular corpus and irregular corpus. For example, configure a regular corpus and multiple irregular corpus:
规则类语料(正则匹配):Rule corpus (regular matching):
(请|请帮我|帮我|...)?(车机|车机上|车机里|车|车上|车里)(播放|打开|...)?(XXX视频)(好吗|可以吗|行么|可不可以|...)?(please|please help me|help me|...)? (Car machine | Car machine | Car machine | Car | On the car | In the car) (Play | Open |...)? (XXX video) (OK | OK | OK | OK |...)?
非规则类语料:Irregular corpus:
XXX视频在车机上打开。The XXX video is opened on the car machine.
打开车机上的XXX视频。Open the XXX video on the car machine.
把车机上的XXX视频打开,行不行。Can you turn on the XXX video on the car machine?
意图回复为输出文字匹配意图语料时执行的操作,本实施例中则是指获取目标设备地址信息,并与意图槽位的变量值组装成一个服务调用请求,并发起调用。The intent reply is an operation performed when the output text matches the intent corpus. In this embodiment, it refers to obtaining the target device address information, assembling it with the variable value of the intent slot into a service call request, and initiating the call.
可选的,进行文本解析时,第一设备将语音文本与上述意图语料进行匹配,并在匹配成功的情况下得到意图槽位上的参数值。Optionally, when performing text parsing, the first device matches the speech text with the above-mentioned intention corpus, and obtains the parameter value in the intention slot if the matching is successful.
在一个示意性的例子中,当语音文本为“在车机上播放xxx视频”时,匹配得到的参数值为var1=“车机”,var2=“视频播放服务”,var3=“播放xxx视频”。In an illustrative example, when the voice text is "Play xxx videos on the car machine", the matched parameter values are var1 = "Car machine", var2 = "Video playback service", var3 = "Play xxx videos" .
步骤502,第一设备基于第一指令识别结果中包含的目标设备名称,从服务器处获取至少一个候选设备的设备地址,候选设备符合目标设备名称。Step 502: The first device obtains the device address of at least one candidate device from the server based on the target device name included in the first instruction recognition result, and the candidate device matches the target device name.
在第一指令识别结果中包含目标设备名称的情况下,可能同时存在多个符合该目标设备名称的候选设备,为了方便后续从中确定出目标设备,第一设备从服务器处获取至少一个候选设备的设备地址。When the first instruction recognition result contains the name of the target device, there may be multiple candidate devices that match the name of the target device. In order to facilitate subsequent determination of the target device, the first device obtains the name of at least one candidate device from the server. Device address.
可选的,该设备地址可以为各个候选设备中服务代理的地址,比如服务代理的网关地址。Optionally, the device address can be the address of the service agent in each candidate device, such as the gateway address of the service agent.
可选的,该候选设备为符合目标设备名称,且与第一设备存在关联关系的设备。该关联关系可以包括如下至少一种:登录相同用户账号、位于同一设备群组或者具有好友关系等等,本申请实施例对此不作限定。Optionally, the candidate device is a device that matches the target device name and is associated with the first device. The association relationship may include at least one of the following: logging in to the same user account, being in the same device group, or having a friend relationship, etc. This is not limited in the embodiment of the present application.
在一种可能的实施方式中,服务器的设备管理模块中存储有用户账号下各个设备的设备地址(由各个设备定时上报)。第一设备的设备选择模块通过调用服务器的设备管理模块,获取当前用户账号下各个符合目标设备名称的候选设备的设备地址。In a possible implementation, the device management module of the server stores the device address of each device under the user account (reported regularly by each device). The device selection module of the first device obtains the device address of each candidate device under the current user account that matches the target device name by calling the device management module of the server.
比如,当目标设备名称为“车机”时,且当前用户账号下包括平板电脑1、智能电视1、车机1、车机2、车机3时,服务器将车机1、车机2以及车机3确定为候选设备,并向智能 手机发送车机1、车机2以及车机3的设备地址。For example, when the target device name is "car machine" and the current user account includes tablet 1, smart TV 1, car machine 1, car machine 2, and car machine 3, the server will use car machine 1, car machine 2, and car machine 3. Car machine 3 is determined as a candidate device, and the device addresses of car machine 1, car machine 2 and car machine 3 are sent to the smartphone.
步骤503,第一设备从至少一个候选设备中确定出第二设备。Step 503: The first device determines the second device from at least one candidate device.
为了保证正确的设备服务调度,第一设备需要从至少一个候选设备中确定出第二设备。其中,第一设备可以自动确定第二设备,或者,基于用户指示确定第二设备(即手动确定)。In order to ensure correct device service scheduling, the first device needs to determine the second device from at least one candidate device. The first device may automatically determine the second device, or determine the second device based on user instructions (that is, manually determine).
在一种可能的实施方式中,第二设备基于目标选取策略,从至少一个候选设备中确定出第二设备。In a possible implementation, the second device determines the second device from at least one candidate device based on the target selection strategy.
可选的,该目标选取策略包括如下至少一种:基于距离的选取策略(比如将与第一设备距离最近的候选设备确定为第二设备)、基于优先级的选取策略(比如基于预先设置的设备优先级,将优先级最高的候选设备确定为第二设备)、基于状态的选取策略(比如将当前处于使用状态的候选设备确定为第二设备)。Optionally, the target selection strategy includes at least one of the following: a distance-based selection strategy (such as determining the candidate device closest to the first device as the second device), a priority-based selection strategy (such as based on a preset Device priority, determine the candidate device with the highest priority as the second device), status-based selection strategy (for example, determine the candidate device currently in use as the second device).
示意性的,服务器定时获取各个设备的设备状态,并将该设备状态与设备地址一同反馈给第一设备,第一设备即将候选设备中处于使用状态的候选设备确定为目标设备。Illustratively, the server periodically obtains the device status of each device, and feeds the device status together with the device address to the first device. The first device determines the candidate device in use among the candidate devices as the target device.
在另一种可能的实施方式中,第二设备显示候选设备列表,候选设备列表中包含至少一个候选设备的设备标识,从而基于对候选设备列表中设备标识的选择操作确定第二设备。In another possible implementation, the second device displays a candidate device list, and the candidate device list includes a device identifier of at least one candidate device, so that the second device is determined based on a selection operation on the device identifier in the candidate device list.
为了进一步提高确定第二设备的准确性,第一设备提供候选设备列表供用户进行选择,并将用户选中的至少一个候选设备确定为目标设备。In order to further improve the accuracy of determining the second device, the first device provides a list of candidate devices for the user to select, and determines at least one candidate device selected by the user as the target device.
当然,除了上述两种确定第二设备的方式外,第一设备还可以采用其他方案(比如自动手动结合方案)确定第二设备,本申请实施例并不对此进行限定。Of course, in addition to the above two ways of determining the second device, the first device can also use other solutions (such as an automatic and manual combination solution) to determine the second device, and the embodiments of the present application are not limited to this.
步骤504,第一设备基于第二设备的设备地址、第一指令识别结果中包含的目标服务名称以及目标动作名称,生成服务调用请求。Step 504: The first device generates a service invocation request based on the device address of the second device, the target service name and the target action name contained in the first instruction recognition result.
进一步的,第一设备为确定出的各个第二设备生成相应的服务调用请求。Further, the first device generates corresponding service invocation requests for each of the determined second devices.
在一种可能的实施方式中,第一设备将设备地址、目标服务名称以及目标动作作为参数,组合成服务调用链接。In a possible implementation, the first device uses the device address, target service name, and target action as parameters to form a service invocation link.
结合上述步骤中的示例,智能手机基于“车机1地址”、“视频播放服务”以及“播放xxx视频”生成服务调用请求。Combining the examples in the above steps, the smartphone generates a service call request based on "car machine 1 address", "video playback service" and "play xxx video".
步骤505,第一设备向第二设备发送服务调用请求。Step 505: The first device sends a service invocation request to the second device.
进一步的,第一设备基于第二设备的设备地址,向第二设备发送服务调用请求。Further, the first device sends a service invocation request to the second device based on the device address of the second device.
步骤506,第二设备接收第一设备发送的服务调用请求。Step 506: The second device receives the service invocation request sent by the first device.
步骤507,第二设备基于服务调用请求中包含的目标服务名称,从服务器处获取目标服务的目标服务定义信息,服务器存储有服务定义信息和服务安装包之间的对应关系。Step 507: The second device obtains the target service definition information of the target service from the server based on the target service name included in the service invocation request. The server stores the correspondence between the service definition information and the service installation package.
为了确定是否需要进行服务的动态部署,第二设备获取服务调用请求中包含的目标服务名称,从而基于目标服务名称,从服务器处获取目标服务的目标服务定义信息。In order to determine whether dynamic deployment of the service is required, the second device obtains the target service name contained in the service invocation request, and thereby obtains the target service definition information of the target service from the server based on the target service name.
在一种可能的实施方式中,第二设备的服务管理模块通过服务器的服务网关,调用服务器定义管理模块获取目标服务的目标服务定义信息。In a possible implementation, the service management module of the second device calls the server definition management module to obtain the target service definition information of the target service through the service gateway of the server.
示意性的,如图7所示,第二设备120的服务管理模块122通过服务网关135调用服务器130的服务定义管理模块131,获取目标服务定义信息。Illustratively, as shown in FIG. 7 , the service management module 122 of the second device 120 calls the service definition management module 131 of the server 130 through the service gateway 135 to obtain the target service definition information.
步骤508,在基于目标服务定义信息确定本地不存在目标服务安装包的情况下,第二设备基于目标服务定义信息从服务器处获取目标服务安装包。Step 508: If it is determined based on the target service definition information that the target service installation package does not exist locally, the second device obtains the target service installation package from the server based on the target service definition information.
在一种可能的实施方式中,服务的服务定义信息与服务安装包的安装包标识关联。第二设备获取到目标服务定义信息后,基于该目标服务定义信息关联的目标安装包标识,检测本地存储是否包含目标服务安装包。若存在目标服务安装包,第二设备确定无需进行动态部署;若不存在目标服务安装包,第二设备则进一步基于目标服务定义信息,从服务器处获取目标服务安装包。In a possible implementation, the service definition information of the service is associated with the installation package identification of the service installation package. After obtaining the target service definition information, the second device detects whether the local storage contains the target service installation package based on the target installation package identifier associated with the target service definition information. If the target service installation package exists, the second device determines that dynamic deployment is not required; if the target service installation package does not exist, the second device further obtains the target service installation package from the server based on the target service definition information.
可选的,第二设备通过服务器的服务网关,调用服务器的服务安装包管理模块获取目标服务安装包。Optionally, the second device calls the service installation package management module of the server to obtain the target service installation package through the service gateway of the server.
示意性的,如图7所示,第二设备120的服务管理模块122通过服务网关135调用服务器130的服务安装包管理模块132,获取目标服务安装包。Illustratively, as shown in FIG. 7 , the service management module 122 of the second device 120 calls the service installation package management module 132 of the server 130 through the service gateway 135 to obtain the target service installation package.
步骤509,第二设备基于目标服务安装包部署目标服务。Step 509: The second device deploys the target service based on the target service installation package.
步骤510,第二设备调用目标服务执行目标动作。Step 510: The second device calls the target service to perform the target action.
上述步骤509至510的实施方式可以参考步骤206至207,本申请实施例在此不作赘述。For the implementation of the above-mentioned steps 509 to 510, reference can be made to steps 206 to 207, which will not be described in detail here in the embodiment of the present application.
示意性的,如图7所示,获取到目标服务安装包后,服务生命周期管理模块123调用服务安装模块124部署目标服务,进而调用服务执行模块125执行请求所指示的目标动作。Illustratively, as shown in Figure 7, after obtaining the target service installation package, the service life cycle management module 123 calls the service installation module 124 to deploy the target service, and then calls the service execution module 125 to execute the target action indicated by the request.
步骤511,第二设备向服务器发送订阅消息,服务器用于基于订阅消息维护第二设备与目标服务之间的订阅关系。Step 511: The second device sends a subscription message to the server, and the server is used to maintain the subscription relationship between the second device and the target service based on the subscription message.
在一些可能的场景下,开发者可能会对已开发的服务进行更新。为了保证设备侧部署的服务的可用性以及时效性,服务器维护各个设备与服务之间的订阅关系,从而基于该订阅关系在服务发生更新时,及时通知相关设备进行服务更新。因此,获取到目标安装包后,第二设备向服务器发送订阅消息,指示服务器更新第二设备的服务订阅信息,即在第二设备的服务订阅信息中添加目标服务。In some possible scenarios, developers may update the developed services. In order to ensure the availability and timeliness of services deployed on the device side, the server maintains the subscription relationship between each device and the service, so that when the service is updated based on the subscription relationship, the relevant device is promptly notified for service updates. Therefore, after obtaining the target installation package, the second device sends a subscription message to the server, instructing the server to update the service subscription information of the second device, that is, to add the target service to the service subscription information of the second device.
示意性的,如图7所示,获取到目标服务安装包后,第二设备120向服务网关135发送订阅消息,服务网关135调用订阅管理模块133更新第二设备的订阅关系。Illustratively, as shown in Figure 7, after obtaining the target service installation package, the second device 120 sends a subscription message to the service gateway 135, and the service gateway 135 calls the subscription management module 133 to update the subscription relationship of the second device.
当然,在其他可能的实施方式中,服务器也可以在提供服务安装包后,自动更新设备与服务的订阅关系,本实施例对此并不构成限定。Of course, in other possible implementations, the server can also automatically update the subscription relationship between the device and the service after providing the service installation package, which is not limited in this embodiment.
步骤512,第二设备接收服务器发送的服务更新消息,服务更新消息在目标服务安装包更新的情况下由服务器基于订阅关系推送。Step 512: The second device receives the service update message sent by the server. The service update message is pushed by the server based on the subscription relationship when the target service installation package is updated.
当服务发生更新时,服务器基于设备与服务之间的订阅关系,向各个订阅该服务的设备推送服务更新消息。可选的,该服务更新消息中包含服务名称。When a service is updated, the server pushes a service update message to each device that subscribes to the service based on the subscription relationship between the device and the service. Optionally, the service update message includes the service name.
在一个示意性的例子中,服务器中维护的订阅关系如表一所示。In an illustrative example, the subscription relationship maintained in the server is shown in Table 1.
表一Table I
服务Serve 设备equipment
视频播放服务Video playback service 车机1、智能电视1Car machine 1, smart TV 1
截屏服务Screen capture service 车机1、智能手机1、平板电脑1、智能手表Car machine 1, smartphone 1, tablet 1, smart watch
投屏服务Screen casting service 车机2、智能电视1、平板电脑1Car machine 2, smart TV 1, tablet 1
当视频播放服务发生更新时,服务器基于表一所示的订阅关系,分别向车机1以及智能电视1推送服务更新消息。When the video playback service is updated, the server pushes service update messages to the car machine 1 and the smart TV 1 respectively based on the subscription relationship shown in Table 1.
示意性的,如图8所示,开发者通过服务网关135调用服务定义管理模块131的上传接口,将更新后的服务定义信息上传至服务器130,并通过服务网关135调用服务安装包管理模块131的上传接口,将更新后的服务安装包上传至服务器130。完成服务定义信息以及服务安装包更新后,服务器130的订阅管理模块133,即通过服务网关135向第二设备120的服务代理121发送服务更新消息。Schematically, as shown in Figure 8, the developer calls the upload interface of the service definition management module 131 through the service gateway 135, uploads the updated service definition information to the server 130, and calls the service installation package management module 131 through the service gateway 135. The upload interface is used to upload the updated service installation package to the server 130. After completing the update of the service definition information and the service installation package, the subscription management module 133 of the server 130 sends a service update message to the service agent 121 of the second device 120 through the service gateway 135 .
步骤513,第二设备基于服务更新消息从服务器处获取更新后的目标服务安装包。Step 513: The second device obtains the updated target service installation package from the server based on the service update message.
进一步的,第二设备基于服务更新消息中的服务名称,从服务器处获取更新后的目标服务器安装包,并下载原先部署的目标服务,同时删除原先存储的目标服务安装包。Further, based on the service name in the service update message, the second device obtains the updated target server installation package from the server, downloads the originally deployed target service, and deletes the originally stored target service installation package.
示意性的,如图8所示,第二设备120的服务管理模块122从服务器120处获取更新后的服务安装包,并存储至本地存储中。Illustratively, as shown in FIG. 8 , the service management module 122 of the second device 120 obtains the updated service installation package from the server 120 and stores it in local storage.
可选的,第二设备可以进一步基于更新后的目标服务安装包重新部署目标服务,或者,在后续接收到服务调用请求时,实时进行服务部署,本实施例对此不作限定。Optionally, the second device may further redeploy the target service based on the updated target service installation package, or perform service deployment in real time when subsequently receiving a service invocation request, which is not limited in this embodiment.
本实施例中,第一设备通过获取服务定义信息,并基于服务定义信息确定本地是否存储有服务安装包,避免在存储有服务安装包的情况下重复下载造成流量浪费。In this embodiment, the first device obtains the service definition information and determines whether the service installation package is stored locally based on the service definition information to avoid wasting traffic caused by repeated downloading when the service installation package is stored.
另外,本实施例中,服务器通过维护设备与服务之间的订阅关系,并在服务发生更新的 情况下,基于该订阅关系向相关设备推送服务更新消息,保证设备侧部署服务的可用性和时效性。In addition, in this embodiment, the server maintains the subscription relationship between the device and the service, and when the service is updated, pushes the service update message to the relevant device based on the subscription relationship to ensure the availability and timeliness of the service deployed on the device side. .
为了避免服务长时间占用内存,第二设备可以按照策略自动卸载服务,或者,用户可以通过指令控制第二设备卸载服务。如图9所示,其示出了本申请一个示例性实施例示出的服务卸载过程的流程图。In order to prevent the service from occupying memory for a long time, the second device can automatically uninstall the service according to the policy, or the user can control the second device to uninstall the service through instructions. As shown in Figure 9, it shows a flow chart of a service uninstallation process according to an exemplary embodiment of the present application.
步骤901,第一设备对第二输入指令进行识别,得到第二指令识别结果。Step 901: The first device recognizes the second input command and obtains the second command recognition result.
可选的,第二输入指令可以为语音指令、手势指令或文本指令等等,本申请实施例对输入指令的形式并不进行限定。Optionally, the second input instruction may be a voice instruction, a gesture instruction, a text instruction, etc. The embodiment of the present application does not limit the form of the input instruction.
在一种可能的实施方式中,当对输入指令进行识别,且指令识别结果表征的控制意图为删除已部署服务时,第一设备得到第二指令识别结果,其中,该第二指令识别结果中包含生成服务卸载请求所需的参数。In a possible implementation, when the input instruction is recognized and the control intention represented by the instruction identification result is to delete the deployed service, the first device obtains the second instruction identification result, wherein the second instruction identification result contains: Contains the parameters required to generate a service uninstall request.
可选的,该第二指令识别结果中包含待卸载服务的设备名称,以及待卸载服务的服务名称。Optionally, the second instruction identification result includes the device name of the service to be uninstalled and the service name of the service to be uninstalled.
第一设备进行指令识别的具体方式可以参考上述实施例,本实施例在此不作赘述。For the specific manner in which the first device recognizes the instruction, reference may be made to the above embodiment, which will not be described in detail here.
在一个示意性的例子中,智能手机对“删除车机上的视频播放服务”进行语音识别,得到的语音识别结果中包含设备名称“车机”以及服务名称“视频播放服务”。In an illustrative example, the smartphone performs speech recognition on "Delete the video playback service on the car machine", and the obtained speech recognition result includes the device name "car machine" and the service name "video playback service".
步骤902,第一设备基于第二指令识别结果生成服务卸载请求,服务卸载请求用于请求第二设备卸载目标服务。Step 902: The first device generates a service uninstallation request based on the second instruction recognition result. The service uninstallation request is used to request the second device to uninstall the target service.
在第二指令识别结果中包含设备名称的情况下,可能同时存在多个符合该设备名称的候选设备,为了保证后续服务卸载的准确性,第一设备需要从候选设备中确定出实际需要进行服务下载的目标设备。In the case where the device name is included in the second command recognition result, there may be multiple candidate devices that match the device name. In order to ensure the accuracy of subsequent service uninstallation, the first device needs to determine the actual need for service from the candidate devices. The target device for downloading.
在一种可能的实施方式中,本步骤可以包括如下步骤:In a possible implementation, this step may include the following steps:
1、基于第二指令识别结果中包含的目标设备名称以及目标服务名称,从服务器处获取至少一个候选设备的设备地址,候选设备符合目标设备名称,且部署有目标服务。1. Based on the target device name and target service name included in the second instruction recognition result, obtain the device address of at least one candidate device from the server. The candidate device matches the target device name and is deployed with the target service.
为了方便后续从中确定出目标设备,第一设备从服务器处获取至少一个候选设备的设备地址。可选的,该设备地址可以为各个候选设备中服务代理的地址,比如服务代理的网关地址。In order to facilitate subsequent determination of the target device, the first device obtains the device address of at least one candidate device from the server. Optionally, the device address can be the address of the service agent in each candidate device, such as the gateway address of the service agent.
可选的,该候选设备为符合目标设备名称,与第一设备存在关联关系,且部署有目标服务的设备。该关联关系可以包括如下至少一种:登录相同用户账号、位于同于设备群组或者具有好友关系等等,本申请实施例对此不作限定。Optionally, the candidate device is a device that matches the target device name, is associated with the first device, and is deployed with the target service. The association relationship may include at least one of the following: logging in to the same user account, being in the same device group, or having a friend relationship, etc. This is not limited in the embodiment of the present application.
在一种可能的实施方式中,服务器的设备管理模块中存储有用户账号下各个设备的设备地址(由各个设备定时上报),且订阅管理模块中存储有服务与设备之间的订阅关系,第一设备的设备选择模块通过调用服务器的设备管理模块以及订阅管理模块,获取当前用户账号下各个符合目标设备名称,且部署有目标服务的候选设备的设备地址。In a possible implementation, the device management module of the server stores the device address of each device under the user account (reported regularly by each device), and the subscription management module stores the subscription relationship between the service and the device. The device selection module of a device obtains the device address of each candidate device under the current user account that matches the target device name and is deployed with the target service by calling the device management module and subscription management module of the server.
比如,目标设备名称为“车机”,当前用户账号下包括平板电脑1、智能电视1、车机1、车机2、车机3,且存储有车机1与视频播放服务的订阅关系,因此服务器将车机1确定为候选设备,并向智能手机发送车机1的设备地址。For example, the name of the target device is "car machine", and the current user account includes tablet 1, smart TV 1, car machine 1, car machine 2, and car machine 3, and the subscription relationship between car machine 1 and the video playback service is stored. Therefore, the server determines the vehicle computer 1 as a candidate device and sends the device address of the vehicle computer 1 to the smartphone.
2、从至少一个候选设备中确定出第二设备。2. Determine the second device from at least one candidate device.
为了保证正确的服务卸载,第一设备需要从至少一个候选设备中确定出第二设备。其中,第一设备可以自动确定第二设备,或者,基于用户指示确定第二设备(即手动确定)。In order to ensure correct service offloading, the first device needs to determine the second device from at least one candidate device. The first device may automatically determine the second device, or determine the second device based on user instructions (that is, manually determine).
在一种可能的实施方式中,第二设备基于目标选取策略,从至少一个候选设备中确定出第二设备。In a possible implementation, the second device determines the second device from at least one candidate device based on the target selection strategy.
可选的,该目标选取策略包括如下至少一种:基于距离的选取策略(比如将与第一设备距离最近的候选设备确定为第二设备)、基于优先级的选取策略(比如基于预先设置的设备优 先级,将优先级最高的候选设备确定为第二设备)、基于状态的选取策略(比如将当前处于使用状态的候选设备确定为第二设备)。Optionally, the target selection strategy includes at least one of the following: a distance-based selection strategy (such as determining the candidate device closest to the first device as the second device), a priority-based selection strategy (such as based on a preset Device priority, determine the candidate device with the highest priority as the second device), status-based selection strategy (for example, determine the candidate device currently in use as the second device).
比如,服务器定时获取各个设备的设备状态,并将该设备状态与设备地址一同反馈给第一设备,第一设备即将候选设备中处于使用状态的候选设备确定为目标设备。For example, the server periodically obtains the device status of each device and feeds back the device status together with the device address to the first device. The first device determines the candidate device in use among the candidate devices as the target device.
在另一种可能的实施方式中,第二设备显示候选设备列表,候选设备列表中包含至少一个候选设备的设备标识,从而基于对候选设备列表中设备标识的选择操作确定第二设备。In another possible implementation, the second device displays a candidate device list, and the candidate device list includes a device identifier of at least one candidate device, so that the second device is determined based on a selection operation on the device identifier in the candidate device list.
为了进一步提高确定出的第二设备的准确性,第一设备提供候选设备列表供用户进行选择,并将用户选中的至少一个候选设备确定为目标设备。In order to further improve the accuracy of the determined second device, the first device provides a list of candidate devices for the user to select, and determines at least one candidate device selected by the user as the target device.
当然,除了上述两种确定第二设备的方式外,第一设备还可以采用其他方案(比如自动手动结合方案)确定第二设备,本申请实施例并不对此进行限定。Of course, in addition to the above two ways of determining the second device, the first device can also use other solutions (such as an automatic and manual combination solution) to determine the second device, and the embodiments of the present application are not limited to this.
3、基于第二设备的设备地址以及目标服务名称,生成服务卸载请求。3. Generate a service uninstallation request based on the device address of the second device and the target service name.
进一步的,第一设备为确定出的各个第二设备生成相应的服务卸载请求。Further, the first device generates corresponding service uninstallation requests for each of the determined second devices.
在一种可能的实施方式中,第一设备将设备地址和目标服务名称作为参数,组合成服务卸载链接。In a possible implementation, the first device combines the device address and the target service name as parameters to form a service uninstallation link.
结合上述步骤中的示例,智能手机基于“车机1地址”以及“视频播放服务”生成服务卸载请求。Combining the examples in the above steps, the smartphone generates a service uninstallation request based on the "car machine 1 address" and "video playback service".
步骤903,第一设备向第二设备发送服务卸载请求。Step 903: The first device sends a service uninstallation request to the second device.
在一种可能的实现方式中,第一设备基于第二设备的设备地址,向第二设备发送服务卸载请求。In a possible implementation, the first device sends a service uninstallation request to the second device based on the device address of the second device.
步骤904,第二设备接收第一设备发送的服务卸载请求。Step 904: The second device receives the service uninstallation request sent by the first device.
在一种可能的实施方式中,第二设备通过服务代理接收该服务卸载请求。In a possible implementation, the second device receives the service uninstallation request through a service proxy.
在一些实施例中,第二设备对该服务卸载请求进行校验,并在通过校验后进一步响应该服务卸载请求。其中,校验方式包括请求完整性校验、卸载请求方校验以及参数合规校验等等,本申请实施例对此不作限定。In some embodiments, the second device verifies the service uninstallation request, and further responds to the service uninstallation request after passing the verification. The verification methods include request integrity verification, offload requester verification, parameter compliance verification, etc., which are not limited in the embodiments of this application.
可选的,第二设备接收到服务卸载请求后,自动确定是否接受该请求,或者,基于用户指示确定是都接受该请求。若接受该请求,则执行步骤905;若不接受该请求,则结束流程(可以向第一设备发送拒绝卸载通知)。Optionally, after receiving the service uninstallation request, the second device automatically determines whether to accept the request, or determines whether to accept the request based on user instructions. If the request is accepted, step 905 is executed; if the request is not accepted, the process ends (an uninstallation rejection notification may be sent to the first device).
步骤905,第二设备基于服务卸载请求卸载目标服务。Step 905: The second device uninstalls the target service based on the service uninstallation request.
为了保证服务卸载的准确性,在一种可能的实施方式中,第二设备首先基于服务卸载请求中包含的目标服务名称,从服务器处获取目标服务的目标服务定义信息,从而基于目标服务定义信息卸载目标服务,并删除本地存储的目标服务安装包。In order to ensure the accuracy of service uninstallation, in a possible implementation, the second device first obtains the target service definition information of the target service from the server based on the target service name included in the service uninstallation request, and then based on the target service definition information Uninstall the target service and delete the locally stored target service installation package.
此外,为了避免服务卸载后设备仍旧能够接收到服务更新消息,在一种可能的实施方式中,在目标服务被卸载的情况下(不论是指令控制还是自动卸载),第二设备向服务器发送订阅取消消息,指示服务器对订阅关系进行更新,相应的,服务器用于基于订阅取消消息删除第二设备与目标服务之间的订阅关系。In addition, in order to prevent the device from still receiving the service update message after the service is uninstalled, in a possible implementation, when the target service is uninstalled (whether under command control or automatic uninstallation), the second device sends a subscription to the server The cancellation message instructs the server to update the subscription relationship. Correspondingly, the server is used to delete the subscription relationship between the second device and the target service based on the subscription cancellation message.
可选的,该订阅取消消息中包含第二设备的设备标识以及目标服务的目标服务名称。Optionally, the subscription cancellation message includes the device identification of the second device and the target service name of the target service.
示意性的,如图10所示,第二设备120通过服务代理121接收到服务卸载请求后,服务管理模块122通过服务网关135,调用服务定义管理模块131获取目标服务名称对应的目标服务定义信息,进而通过服务生命周期管理模块123调用服务卸载模块126卸载目标服务,并删除目标服务安装包。完成服务卸载后,第二设备120进一步向服务器130发送订阅取消消息,以便服务器130的订阅管理模块133删除目标服务与第二设备的订阅关系。Illustratively, as shown in Figure 10, after the second device 120 receives the service uninstallation request through the service proxy 121, the service management module 122 calls the service definition management module 131 through the service gateway 135 to obtain the target service definition information corresponding to the target service name. , and then call the service uninstall module 126 through the service life cycle management module 123 to uninstall the target service and delete the target service installation package. After completing the service uninstallation, the second device 120 further sends a subscription cancellation message to the server 130 so that the subscription management module 133 of the server 130 deletes the subscription relationship between the target service and the second device.
本实施例中,用户可以通过输入指令的方式,指示第二设备进行服务卸载,无需用户手动卸载,从而简化了服务卸载流程,并避免第二设备中部署过多服务影响设备运行性能。In this embodiment, the user can instruct the second device to uninstall the service by inputting instructions without requiring the user to manually uninstall, thereby simplifying the service uninstallation process and preventing too many services deployed in the second device from affecting the device's operating performance.
在另一种可能的实施方式中,在满足自动卸载条件的情况下,第二设备卸载目标服务, 其中,自动卸载条件包括如下至少一种:目标服务的调用次数达到次数阈值、目标服务在目标时长内未被调用以及目标服务的部署时长达到时长阈值。In another possible implementation, the second device uninstalls the target service when the automatic uninstallation conditions are met, wherein the automatic uninstallation conditions include at least one of the following: the number of calls to the target service reaches a threshold, the target service is in the target service It has not been called within the duration and the deployment duration of the target service reaches the duration threshold.
可选的,该自动卸载条件设置在服务生命周期管理模块中,且支持自定义。Optionally, the automatic uninstallation condition is set in the service life cycle management module and supports customization.
比如,当目标服务的调用次数达到2次时,第二设备中的服务生命周期管理模块自动调用服务卸载模块卸载目标服务;当目标服务在2小时内未被调用时,第二设备中的服务生命周期管理模块自动调用服务卸载模块卸载目标服务;当目标服务的部署时长达到24小时的情况下,第二设备中的服务生命周期管理模块自动调用服务卸载模块卸载目标服务。For example, when the number of calls to the target service reaches 2 times, the service life cycle management module in the second device automatically calls the service uninstall module to uninstall the target service; when the target service has not been called within 2 hours, the service in the second device The life cycle management module automatically calls the service uninstall module to uninstall the target service; when the deployment time of the target service reaches 24 hours, the service life cycle management module in the second device automatically calls the service uninstall module to uninstall the target service.
上述实施例中以交互过程为例进行示意性说明,其中,以第一设备为执行主体的步骤可以单独实现成为第一设备侧的服务调用方法,以第二设备为执行主体的步骤可以单独实现成为第二设备侧的服务调用方法,以服务器为执行主体的步骤可以单独实现成为服务器侧的服务调用方法,本申请实施例在此不作赘述。In the above embodiment, the interaction process is taken as an example for schematic explanation, wherein the steps with the first device as the execution subject can be independently implemented as a service invocation method on the first device side, and the steps with the second device as the execution subject can be implemented independently. To become a service invocation method on the second device side, the steps with the server as the execution subject can be independently implemented as a service invocation method on the server side. The embodiments of this application will not be described in detail here.
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are device embodiments of the present application, which can be used to execute method embodiments of the present application. For details not disclosed in the device embodiments of this application, please refer to the method embodiments of this application.
请参考图11,其示出了本申请一个实施例提供的服务调用装置的结构框图。该装置可以包括:Please refer to Figure 11, which shows a structural block diagram of a service invoking device provided by an embodiment of the present application. The device may include:
指令识别模块1101,用于对第一输入指令进行识别,得到第一指令识别结果;The instruction identification module 1101 is used to identify the first input instruction and obtain the first instruction identification result;
请求生成模块1102,用于基于所述第一指令识别结果生成服务调用请求,所述服务调用请求用于请求第二设备调用目标服务以执行目标动作; Request generation module 1102, configured to generate a service invocation request based on the first instruction recognition result, where the service invocation request is used to request the second device to invoke a target service to perform a target action;
请求发送模块1103,用于向所述第二设备发送所述服务调用请求,以使所述第二设备基于目标服务安装包部署所述目标服务,并调用所述目标服务执行所述目标动作,所述目标服务安装包从服务器获得。 Request sending module 1103, configured to send the service invocation request to the second device, so that the second device deploys the target service based on the target service installation package and calls the target service to perform the target action, The target service installation package is obtained from the server.
可选的,所述请求生成模块1102,用于:Optionally, the request generation module 1102 is used for:
基于所述第一指令识别结果中包含的目标设备名称,从所述服务器处获取至少一个候选设备的设备地址,所述候选设备符合所述目标设备名称;Based on the target device name included in the first instruction recognition result, obtain the device address of at least one candidate device from the server, and the candidate device matches the target device name;
从至少一个所述候选设备中确定出所述第二设备;determining the second device from at least one of the candidate devices;
基于所述第二设备的所述设备地址、所述第一指令识别结果中包含的目标服务名称以及目标动作名称,生成所述服务调用请求;Generate the service invocation request based on the device address of the second device, the target service name and the target action name contained in the first instruction recognition result;
所述请求发送模块1103,用于:The request sending module 1103 is used for:
基于所述第二设备的所述设备地址,向所述第二设备发送所述服务调用请求。The service invocation request is sent to the second device based on the device address of the second device.
可选的,从至少一个所述候选设备中确定出所述第二设备的过程中,所述请求生成模块1102,用于:Optionally, in the process of determining the second device from at least one of the candidate devices, the request generation module 1102 is used to:
基于目标选取策略,从至少一个所述候选设备中确定出所述第二设备;Determine the second device from at least one of the candidate devices based on a target selection strategy;
或,or,
显示候选设备列表,所述候选设备列表中包含至少一个所述候选设备的设备标识;基于对所述候选设备列表中设备标识的选择操作确定所述第二设备。Display a candidate device list, the candidate device list includes at least one device identifier of the candidate device; and determine the second device based on a selection operation on the device identifier in the candidate device list.
可选的,所述指令识别模块1101,还用于对第二输入指令进行识别,得到第二指令识别结果;Optionally, the instruction identification module 1101 is also used to identify the second input instruction to obtain the second instruction identification result;
所述请求生成模块1102,还用于基于所述第二指令识别结果生成服务卸载请求,所述服务卸载请求用于请求所述第二设备卸载所述目标服务;The request generation module 1102 is further configured to generate a service uninstallation request based on the second instruction identification result, where the service uninstallation request is used to request the second device to uninstall the target service;
所述请求发送模块1103,还用于向所述第二设备发送所述服务卸载请求,以使所述第二设备卸载所述目标服务。The request sending module 1103 is also configured to send the service uninstallation request to the second device, so that the second device uninstalls the target service.
可选的,基于所述第二指令识别结果生成服务卸载请求的过程中,所述请求生成模块1102,用于:Optionally, in the process of generating a service uninstallation request based on the second instruction recognition result, the request generation module 1102 is used to:
基于所述第二指令识别结果中包含的目标设备名称以及目标服务名称,从所述服务器处 获取至少一个候选设备的设备地址,所述候选设备符合所述目标设备名称,且部署有所述目标服务;Based on the target device name and target service name included in the second instruction identification result, obtain the device address of at least one candidate device from the server, the candidate device matches the target device name and is deployed with the target Serve;
从至少一个所述候选设备中确定出所述第二设备;determining the second device from at least one of the candidate devices;
基于所述第二设备的所述设备地址以及所述目标服务名称,生成所述服务卸载请求;Generate the service uninstallation request based on the device address of the second device and the target service name;
所述请求发送模块1103,用于:The request sending module 1103 is used for:
基于所述第二设备的所述设备地址,向所述第二设备发送所述服务卸载请求。The service offloading request is sent to the second device based on the device address of the second device.
请参考图12,其示出了本申请另一个实施例提供的服务调用装置的结构框图。该装置可以包括:Please refer to Figure 12, which shows a structural block diagram of a service invoking device provided by another embodiment of the present application. The device may include:
请求接收模块1201,用于接收第一设备发送的服务调用请求,所述服务调用请求用于请求调用目标服务以执行目标动作,所述服务调用请求由所述第一设备基于对第一输入指令的第一指令识别结果生成; Request receiving module 1201, configured to receive a service invocation request sent by the first device. The service invocation request is used to request to invoke a target service to perform a target action. The service invocation request is generated by the first device based on a first input instruction. The first instruction recognition result is generated;
安装包获取模块1202,用于基于所述服务调用请求从服务器处获取所述目标服务的目标服务安装包;The installation package acquisition module 1202 is configured to obtain the target service installation package of the target service from the server based on the service invocation request;
服务部署模块1203,用于基于所述目标服务安装包部署所述目标服务; Service deployment module 1203, configured to deploy the target service based on the target service installation package;
执行模块1204,用于调用所述目标服务执行所述目标动作。 Execution module 1204 is used to call the target service to execute the target action.
可选的,所述安装包获取模块1202,用于:Optionally, the installation package acquisition module 1202 is used for:
基于所述服务调用请求中包含的目标服务名称,从所述服务器处获取所述目标服务的目标服务定义信息;Based on the target service name included in the service invocation request, obtain the target service definition information of the target service from the server;
在基于所述目标服务定义信息确定本地不存在所述目标服务安装包的情况下,基于所述目标服务定义信息从所述服务器处获取所述目标服务安装包,所述服务器存储有服务定义信息和服务安装包之间的对应关系。When it is determined that the target service installation package does not exist locally based on the target service definition information, the target service installation package is obtained from the server based on the target service definition information, and the server stores service definition information. and the corresponding relationship between service installation packages.
可选的,所述装置还包括:Optionally, the device also includes:
消息发送模块,用于向所述服务器发送订阅消息,所述服务器用于基于所述订阅消息维护所述第二设备与所述目标服务之间的订阅关系。A message sending module is configured to send a subscription message to the server, and the server is configured to maintain a subscription relationship between the second device and the target service based on the subscription message.
可选的,所述装置还包括:Optionally, the device also includes:
消息接收模块,用于接收所述服务器发送的服务更新消息,所述服务更新消息在所述目标服务安装包更新的情况下由所述服务器基于所述订阅关系推送;A message receiving module, configured to receive a service update message sent by the server, which is pushed by the server based on the subscription relationship when the target service installation package is updated;
更新模块,用于基于所述服务更新消息从所述服务器处获取更新后的所述目标服务安装包。An update module, configured to obtain the updated target service installation package from the server based on the service update message.
可选的,所述装置还包括:Optionally, the device also includes:
消息发送模块,用于在所述目标服务被卸载的情况下,向所述服务器发送订阅取消消息,所述服务器用于基于所述订阅取消消息删除所述订阅关系。A message sending module, configured to send a subscription cancellation message to the server when the target service is uninstalled, and the server is configured to delete the subscription relationship based on the subscription cancellation message.
可选的,所述装置还包括:Optionally, the device also includes:
所述请求接收模块1201,还用于接收所述第一设备发送的服务卸载请求,所述服务卸载请求用于请求所述第二设备卸载所述目标服务,所述服务卸载请求由所述第一设备基于对第二输入指令的第二指令识别结果生成;The request receiving module 1201 is also configured to receive a service uninstallation request sent by the first device. The service uninstallation request is used to request the second device to uninstall the target service. The service uninstallation request is sent by the third device. A device is generated based on a second instruction recognition result for the second input instruction;
卸载模块,用于基于所述服务卸载请求卸载所述目标服务。An uninstallation module, configured to uninstall the target service based on the service uninstallation request.
可选的,所述卸载模块,用于:Optional, the uninstall module is used for:
基于所述服务卸载请求中包含的目标服务名称,从所述服务器处获取所述目标服务的所述目标服务定义信息;Based on the target service name included in the service uninstallation request, obtain the target service definition information of the target service from the server;
基于所述目标服务定义信息卸载所述目标服务,并删除本地存储的所述目标服务安装包。Uninstall the target service based on the target service definition information, and delete the locally stored target service installation package.
可选的,所述卸载模块,还用于:Optionally, the uninstall module is also used for:
在满足自动卸载条件的情况下,卸载所述目标服务,所述自动卸载条件包括如下至少一种:所述目标服务的调用次数达到次数阈值、所述目标服务在目标时长内未被调用以及所述 目标服务的部署时长达到时长阈值。The target service is uninstalled when the automatic uninstallation conditions are met. The automatic uninstallation conditions include at least one of the following: the number of calls to the target service reaches a threshold, the target service has not been called within the target duration, and the target service has not been called within the target duration. The deployment duration of the target service reaches the duration threshold.
请参考图13,其示出了本申请一个示例性实施例提供的计算机设备的结构方框图。该计算机设备1300可以实现成为上述各个实施例中的第一设备或第二设备。计算机设备1300可以包括一个或多个如下部件:处理器1310和存储器1320。Please refer to Figure 13, which shows a structural block diagram of a computer device provided by an exemplary embodiment of the present application. The computer device 1300 can be implemented as the first device or the second device in each of the above embodiments. Computer device 1300 may include one or more of the following components: processor 1310 and memory 1320.
处理器1310可以包括一个或者多个处理核心。处理器1310利用各种接口和线路连接整个计算机设备1300内的各个部分,通过运行或执行存储在存储器1320内的指令、程序、代码集或指令集,以及调用存储在存储器1320内的数据,执行计算机设备1300的各种功能和处理数据。可选地,处理器1310可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1310可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)、神经网络处理器(Neural-network Processing Unit,NPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责触摸显示屏所需要显示的内容的渲染和绘制;NPU用于实现人工智能(Artificial Intelligence,AI)功能;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1310中,单独通过一块芯片进行实现。 Processor 1310 may include one or more processing cores. The processor 1310 uses various interfaces and lines to connect various parts of the entire computer device 1300, and executes by running or executing instructions, programs, code sets or instruction sets stored in the memory 1320, and calling data stored in the memory 1320. Various functions of computer device 1300 and processing data. Optionally, the processor 1310 can use at least one of digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). implemented in hardware form. The processor 1310 can integrate one or more of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU), a neural network processor (Neural-network Processing Unit, NPU), a modem, etc. The combination. Among them, the CPU mainly handles the operating system, user interface and applications; the GPU is used to render and draw the content that needs to be displayed on the touch screen; the NPU is used to implement artificial intelligence (Artificial Intelligence, AI) functions; the modem is used to process Wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 1310 and may be implemented by a separate chip.
存储器1320可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选地,该存储器1320包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1320可用于存储指令、程序、代码、代码集或指令集。存储器1320可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等;存储数据区可存储根据计算机设备1300的使用所创建的数据(比如音频数据、电话本)等。The memory 1320 may include random access memory (RAM) or read-only memory (Read-Only Memory, ROM). Optionally, the memory 1320 includes non-transitory computer-readable storage medium. Memory 1320 may be used to store instructions, programs, codes, sets of codes, or sets of instructions. The memory 1320 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions, etc., used to implement each method embodiment described below; the storage data area may store data created according to the use of the computer device 1300 (such as audio data, phone book), etc.
在一些实施例中,当计算机设备1300实现成为第一设备时,该计算机设备1300还设置有语音采集组件,该语音采集组件可以为内置麦克风或外置麦克风。In some embodiments, when the computer device 1300 is implemented as the first device, the computer device 1300 is also provided with a voice collection component, which may be a built-in microphone or an external microphone.
除此之外,本领域技术人员可以理解,上述附图所示出的计算机设备1300的结构并不构成对计算机设备的限定,计算机设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。比如,计算机设备1300中还包括显示屏、摄像组件、扬声器、射频电路、输入单元、传感器(比如加速度传感器、角速度传感器、光线传感器等等)、音频电路、WiFi模块、电源、蓝牙模块等部件,在此不再赘述。In addition, those skilled in the art can understand that the structure of the computer device 1300 shown in the above figures does not constitute a limitation on the computer device. The computer device may include more or less components than those shown in the figures, or a combination thereof. Certain parts, or different arrangements of parts. For example, the computer device 1300 also includes components such as a display screen, camera components, speakers, radio frequency circuits, input units, sensors (such as acceleration sensors, angular velocity sensors, light sensors, etc.), audio circuits, WiFi modules, power supplies, Bluetooth modules, etc. I won’t go into details here.
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有至少一条程序代码,所述程序代码由处理器加载并执行以实现如上各个实施例所述的服务调用方法。Embodiments of the present application also provide a computer-readable storage medium that stores at least one program code. The program code is loaded and executed by a processor to implement the service invocation method described in the above embodiments. .
本申请实施例提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方面的各种可选实现方式中提供的服务调用方法。Embodiments of the present application provide a computer program product or computer program. The computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the service invocation method provided in various optional implementations of the above aspect.
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。另外,本文中描述的步骤编号,仅示例性示出了步骤间的一种可能的执行先后顺序,在一些其它实施例中,上述步骤也可以不按照编号顺序来执行,如两个不同编号的步骤同时执行,或者两个不同编号的步骤按照与图示相反的顺序执行,本申请实施例对此不作限定。It should be understood that "plurality" mentioned in this article means two or more. "And/or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and/or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the related objects are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the numbering sequence, such as two different numbers. The steps are executed simultaneously, or two steps with different numbers are executed in the reverse order as shown in the figure, which is not limited in the embodiments of the present application.
以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection of the present application. within the range.

Claims (29)

  1. 一种服务调用方法,所述方法由第一设备执行,所述方法包括:A service invoking method, the method is executed by a first device, the method includes:
    对第一输入指令进行识别,得到第一指令识别结果;Recognize the first input instruction and obtain the first instruction recognition result;
    基于所述第一指令识别结果生成服务调用请求,所述服务调用请求用于请求第二设备调用目标服务以执行目标动作;Generate a service call request based on the first instruction recognition result, the service call request is used to request the second device to call the target service to perform the target action;
    向所述第二设备发送所述服务调用请求,以使所述第二设备基于目标服务安装包部署所述目标服务并调用所述目标服务执行所述目标动作,所述目标服务安装包从服务器获得。Send the service invocation request to the second device, so that the second device deploys the target service based on the target service installation package and calls the target service to perform the target action, and the target service installation package is downloaded from the server get.
  2. 根据权利要求1所述的方法,其中,所述基于所述第一指令识别结果生成服务调用请求,包括:The method according to claim 1, wherein generating a service invocation request based on the first instruction recognition result includes:
    基于所述第一指令识别结果中包含的目标设备名称,从所述服务器处获取至少一个候选设备的设备地址,所述候选设备符合所述目标设备名称;Based on the target device name included in the first instruction recognition result, obtain the device address of at least one candidate device from the server, and the candidate device matches the target device name;
    从至少一个所述候选设备中确定出所述第二设备;determining the second device from at least one of the candidate devices;
    基于所述第二设备的所述设备地址、所述第一指令识别结果中包含的目标服务名称以及目标动作名称,生成所述服务调用请求;Generate the service invocation request based on the device address of the second device, the target service name and the target action name contained in the first instruction identification result;
    所述向所述第二设备发送所述服务调用请求,包括:Sending the service invocation request to the second device includes:
    基于所述第二设备的所述设备地址,向所述第二设备发送所述服务调用请求。The service invocation request is sent to the second device based on the device address of the second device.
  3. 根据权利要求2所述的方法,其中,所述从至少一个所述候选设备中确定出所述第二设备,包括:The method of claim 2, wherein determining the second device from at least one of the candidate devices includes:
    基于目标选取策略,从至少一个所述候选设备中确定出所述第二设备;Determine the second device from at least one of the candidate devices based on a target selection strategy;
    或,or,
    显示候选设备列表,所述候选设备列表中包含至少一个所述候选设备的设备标识;基于对所述候选设备列表中设备标识的选择操作确定所述第二设备。Display a candidate device list, the candidate device list includes at least one device identifier of the candidate device; and determine the second device based on a selection operation on the device identifier in the candidate device list.
  4. 根据权利要求1至3任一所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 3, wherein the method further includes:
    对第二输入指令进行识别,得到第二指令识别结果;Recognize the second input instruction and obtain the second instruction recognition result;
    基于所述第二指令识别结果生成服务卸载请求,所述服务卸载请求用于请求所述第二设备卸载所述目标服务;Generate a service uninstallation request based on the second instruction identification result, where the service uninstallation request is used to request the second device to uninstall the target service;
    向所述第二设备发送所述服务卸载请求,以使所述第二设备卸载所述目标服务。Send the service uninstallation request to the second device, so that the second device uninstalls the target service.
  5. 根据权利要求4所述的方法,其中,所述基于所述第二指令识别结果生成服务卸载请求,包括:The method of claim 4, wherein generating a service uninstallation request based on the second instruction identification result includes:
    基于所述第二指令识别结果中包含的目标设备名称以及目标服务名称,从所述服务器处获取至少一个候选设备的设备地址,所述候选设备符合所述目标设备名称,且部署有所述目标服务;Based on the target device name and target service name included in the second instruction identification result, obtain the device address of at least one candidate device from the server, the candidate device matches the target device name and is deployed with the target Serve;
    从至少一个所述候选设备中确定出所述第二设备;determining the second device from at least one of the candidate devices;
    基于所述第二设备的所述设备地址以及所述目标服务名称,生成所述服务卸载请求;Generate the service uninstallation request based on the device address of the second device and the target service name;
    所述向所述第二设备发送所述服务卸载请求,包括:Sending the service uninstallation request to the second device includes:
    基于所述第二设备的所述设备地址,向所述第二设备发送所述服务卸载请求。The service offloading request is sent to the second device based on the device address of the second device.
  6. 一种服务调用方法,所述方法由第二设备执行,所述方法包括:A service invoking method, the method is executed by a second device, the method includes:
    接收第一设备发送的服务调用请求,所述服务调用请求用于请求调用目标服务以执行目标动作,所述服务调用请求由所述第一设备基于对第一输入指令的第一指令识别结果生成;Receive a service invocation request sent by the first device, the service invocation request is used to request to call a target service to perform a target action, the service invocation request is generated by the first device based on the first instruction recognition result of the first input instruction. ;
    基于所述服务调用请求从服务器处获取所述目标服务的目标服务安装包;Obtain the target service installation package of the target service from the server based on the service invocation request;
    基于所述目标服务安装包部署所述目标服务;Deploy the target service based on the target service installation package;
    调用所述目标服务执行所述目标动作。Call the target service to perform the target action.
  7. 根据权利要求6所述的方法,其中,所述基于所述服务调用请求从服务器处获取所述目标服务的目标服务安装包,包括:The method according to claim 6, wherein said obtaining the target service installation package of the target service from the server based on the service invocation request includes:
    基于所述服务调用请求中包含的目标服务名称,从所述服务器处获取所述目标服务的目标服务定义信息;Based on the target service name included in the service invocation request, obtain the target service definition information of the target service from the server;
    在基于所述目标服务定义信息确定本地不存在所述目标服务安装包的情况下,基于所述目标服务定义信息从所述服务器处获取所述目标服务安装包,所述服务器存储有服务定义信息和服务安装包之间的对应关系。When it is determined that the target service installation package does not exist locally based on the target service definition information, the target service installation package is obtained from the server based on the target service definition information, and the server stores service definition information. and the corresponding relationship between service installation packages.
  8. 根据权利要求6所述的方法,其中,所述方法还包括:The method of claim 6, further comprising:
    向所述服务器发送订阅消息,所述服务器用于基于所述订阅消息维护所述第二设备与所述目标服务之间的订阅关系。Send a subscription message to the server, and the server is configured to maintain a subscription relationship between the second device and the target service based on the subscription message.
  9. 根据权利要求8所述的方法,其中,所述方法还包括:The method of claim 8, further comprising:
    接收所述服务器发送的服务更新消息,所述服务更新消息在所述目标服务安装包更新的情况下由所述服务器基于所述订阅关系推送;Receive a service update message sent by the server, which is pushed by the server based on the subscription relationship when the target service installation package is updated;
    基于所述服务更新消息从所述服务器处获取更新后的所述目标服务安装包。Obtain the updated target service installation package from the server based on the service update message.
  10. 根据权利要求8所述的方法,其中,所述方法还包括:The method of claim 8, further comprising:
    在所述目标服务被卸载的情况下,向所述服务器发送订阅取消消息,所述服务器用于基于所述订阅取消消息删除所述订阅关系。When the target service is uninstalled, a subscription cancellation message is sent to the server, and the server is configured to delete the subscription relationship based on the subscription cancellation message.
  11. 根据权利要求6至10任一所述的方法,其中,所述方法还包括:The method according to any one of claims 6 to 10, wherein the method further includes:
    接收所述第一设备发送的服务卸载请求,所述服务卸载请求用于请求所述第二设备卸载所述目标服务,所述服务卸载请求由所述第一设备基于对第二输入指令的第二指令识别结果生成;Receive a service uninstallation request sent by the first device, the service uninstallation request is used to request the second device to uninstall the target service, the service uninstallation request is generated by the first device based on a second input instruction. 2. Instruction recognition result generation;
    基于所述服务卸载请求卸载所述目标服务。The target service is uninstalled based on the service uninstallation request.
  12. 根据权利要求11所述的方法,其中,所述基于所述服务卸载请求卸载所述目标服务,包括:The method according to claim 11, wherein the uninstalling the target service based on the service uninstallation request includes:
    基于所述服务卸载请求中包含的目标服务名称,从所述服务器处获取所述目标服务的所述目标服务定义信息;Based on the target service name included in the service uninstallation request, obtain the target service definition information of the target service from the server;
    基于所述目标服务定义信息卸载所述目标服务,并删除本地存储的所述目标服务安装包。Uninstall the target service based on the target service definition information, and delete the locally stored target service installation package.
  13. 根据权利要求6至10任一所述的方法,其中,所述方法还包括:The method according to any one of claims 6 to 10, wherein the method further includes:
    在满足自动卸载条件的情况下,卸载所述目标服务,所述自动卸载条件包括如下至少一种:所述目标服务的调用次数达到次数阈值、所述目标服务在目标时长内未被调用以及所述目标服务的部署时长达到时长阈值。The target service is uninstalled when the automatic uninstallation conditions are met. The automatic uninstallation conditions include at least one of the following: the number of calls to the target service reaches a threshold, the target service has not been called within the target duration, and the target service has not been called within the target duration. The deployment duration of the target service reaches the duration threshold.
  14. 一种服务调用装置,所述装置包括:A service invoking device, the device includes:
    指令识别模块,用于对第一输入指令进行识别,得到第一指令识别结果;An instruction identification module, used to identify the first input instruction and obtain the first instruction identification result;
    请求生成模块,用于基于所述第一指令识别结果生成服务调用请求,所述服务调用请求用于请求第二设备调用目标服务以执行目标动作;A request generation module, configured to generate a service invocation request based on the first instruction recognition result, the service invocation request being used to request the second device to invoke the target service to perform the target action;
    请求发送模块,用于向所述第二设备发送所述服务调用请求,以使所述第二设备基于目标服务安装包部署所述目标服务,并调用所述目标服务执行所述目标动作,所述目标服务安装包从服务器获得。A request sending module, configured to send the service invocation request to the second device, so that the second device deploys the target service based on the target service installation package and calls the target service to perform the target action, so The above target service installation package is obtained from the server.
  15. 根据权利要求14所述的装置,其中,所述请求生成模块,用于:The device according to claim 14, wherein the request generation module is used for:
    基于所述第一指令识别结果中包含的目标设备名称,从所述服务器处获取至少一个候选设备的设备地址,所述候选设备符合所述目标设备名称;Based on the target device name included in the first instruction recognition result, obtain the device address of at least one candidate device from the server, and the candidate device matches the target device name;
    从至少一个所述候选设备中确定出所述第二设备;determining the second device from at least one of the candidate devices;
    基于所述第二设备的所述设备地址、所述第一指令识别结果中包含的目标服务名称以及目标动作名称,生成所述服务调用请求;Generate the service invocation request based on the device address of the second device, the target service name and the target action name contained in the first instruction identification result;
    所述请求发送模块,用于:The request sending module is used for:
    基于所述第二设备的所述设备地址,向所述第二设备发送所述服务调用请求。The service invocation request is sent to the second device based on the device address of the second device.
  16. 根据权利要求15所述装置,其中,从至少一个所述候选设备中确定出所述第二设备的过程中,所述请求生成模块,用于:The apparatus according to claim 15, wherein in the process of determining the second device from at least one of the candidate devices, the request generation module is configured to:
    基于目标选取策略,从至少一个所述候选设备中确定出所述第二设备;Determine the second device from at least one of the candidate devices based on a target selection strategy;
    或,or,
    显示候选设备列表,所述候选设备列表中包含至少一个所述候选设备的设备标识;基于对所述候选设备列表中设备标识的选择操作确定所述第二设备。Display a candidate device list, the candidate device list includes at least one device identifier of the candidate device; and determine the second device based on a selection operation on the device identifier in the candidate device list.
  17. 根据权利要求14至16任一所述的装置,其中,所述指令识别模块,还用于对第二输入指令进行识别,得到第二指令识别结果;The device according to any one of claims 14 to 16, wherein the instruction identification module is also used to identify the second input instruction to obtain the second instruction identification result;
    所述请求生成模块,还用于基于所述第二指令识别结果生成服务卸载请求,所述服务卸载请求用于请求所述第二设备卸载所述目标服务;The request generation module is further configured to generate a service uninstallation request based on the second instruction identification result, where the service uninstallation request is used to request the second device to uninstall the target service;
    所述请求发送模块,还用于向所述第二设备发送所述服务卸载请求,以使所述第二设备卸载所述目标服务。The request sending module is also configured to send the service uninstallation request to the second device, so that the second device uninstalls the target service.
  18. 根据权利要求17所述的装置,其中,基于所述第二指令识别结果生成服务卸载请求的过程中,所述请求生成模块,用于:The device according to claim 17, wherein in the process of generating a service uninstallation request based on the second instruction identification result, the request generation module is configured to:
    基于所述第二指令识别结果中包含的目标设备名称以及目标服务名称,从所述服务器处获取至少一个候选设备的设备地址,所述候选设备符合所述目标设备名称,且部署有所述目标服务;Based on the target device name and target service name included in the second instruction identification result, obtain the device address of at least one candidate device from the server, the candidate device matches the target device name and is deployed with the target Serve;
    从至少一个所述候选设备中确定出所述第二设备;determining the second device from at least one of the candidate devices;
    基于所述第二设备的所述设备地址以及所述目标服务名称,生成所述服务卸载请求;Generate the service uninstallation request based on the device address of the second device and the target service name;
    所述请求发送模块,用于:The request sending module is used for:
    基于所述第二设备的所述设备地址,向所述第二设备发送所述服务卸载请求。The service offloading request is sent to the second device based on the device address of the second device.
  19. 一种服务调用装置,所述装置包括:A service invoking device, the device includes:
    请求接收模块,用于接收第一设备发送的服务调用请求,所述服务调用请求用于请求调用目标服务以执行目标动作,所述服务调用请求由所述第一设备基于对第一输入指令的第一指令识别结果生成;A request receiving module, configured to receive a service invocation request sent by the first device. The service invocation request is used to request the invocation of a target service to perform a target action. The service invocation request is generated by the first device based on a response to a first input instruction. The first instruction recognition result is generated;
    安装包获取模块,用于基于所述服务调用请求从服务器处获取所述目标服务的目标服务安装包;An installation package acquisition module, configured to obtain the target service installation package of the target service from the server based on the service invocation request;
    服务部署模块,用于基于所述目标服务安装包部署所述目标服务;A service deployment module, configured to deploy the target service based on the target service installation package;
    执行模块,用于调用所述目标服务执行所述目标动作。An execution module is used to call the target service to execute the target action.
  20. 根据权利要求19所述的装置,其中,所述安装包获取模块,用于:The device according to claim 19, wherein the installation package acquisition module is used for:
    基于所述服务调用请求中包含的目标服务名称,从所述服务器处获取所述目标服务的目标服务定义信息;Based on the target service name included in the service invocation request, obtain the target service definition information of the target service from the server;
    在基于所述目标服务定义信息确定本地不存在所述目标服务安装包的情况下,基于所述目标服务定义信息从所述服务器处获取所述目标服务安装包,所述服务器存储有服务定义信息和服务安装包之间的对应关系。When it is determined that the target service installation package does not exist locally based on the target service definition information, the target service installation package is obtained from the server based on the target service definition information, and the server stores service definition information. and the corresponding relationship between service installation packages.
  21. 根据权利要求19所述的装置,其中,所述装置还包括:The device of claim 19, wherein the device further comprises:
    消息发送模块,用于向所述服务器发送订阅消息,所述服务器用于基于所述订阅消息维护所述第二设备与所述目标服务之间的订阅关系。A message sending module is configured to send a subscription message to the server, and the server is configured to maintain a subscription relationship between the second device and the target service based on the subscription message.
  22. 根据权利要求21所述的装置,其中,所述装置还包括:The device of claim 21, wherein the device further comprises:
    消息接收模块,用于接收所述服务器发送的服务更新消息,所述服务更新消息在所述目标服务安装包更新的情况下由所述服务器基于所述订阅关系推送;A message receiving module, configured to receive a service update message sent by the server, which is pushed by the server based on the subscription relationship when the target service installation package is updated;
    更新模块,用于基于所述服务更新消息从所述服务器处获取更新后的所述目标服务安装包。An update module, configured to obtain the updated target service installation package from the server based on the service update message.
  23. 根据权利要求21所述的装置,其中,所述装置还包括:The device of claim 21, wherein the device further comprises:
    发送模块,用于在所述目标服务被卸载的情况下,向所述服务器发送订阅取消消息,所述服务器用于基于所述订阅取消消息删除所述订阅关系。A sending module, configured to send a subscription cancellation message to the server when the target service is uninstalled, and the server is configured to delete the subscription relationship based on the subscription cancellation message.
  24. 根据权利要求19至23所述的装置,其中,所述装置还包括:The device of claims 19 to 23, wherein the device further comprises:
    所述请求接收模块,还用于接收所述第一设备发送的服务卸载请求,所述服务卸载请求用于请求所述第二设备卸载所述目标服务,所述服务卸载请求由所述第一设备基于对第二输入指令的第二指令识别结果生成;The request receiving module is also configured to receive a service uninstallation request sent by the first device. The service uninstallation request is used to request the second device to uninstall the target service. The service uninstallation request is sent by the first device. The device generates based on the second instruction recognition result for the second input instruction;
    卸载模块,用于基于所述服务卸载请求卸载所述目标服务。An uninstallation module, configured to uninstall the target service based on the service uninstallation request.
  25. 根据权利要求24所述的装置,其中,所述卸载模块,用于:The device according to claim 24, wherein the unloading module is used for:
    基于所述服务卸载请求中包含的目标服务名称,从所述服务器处获取所述目标服务的所述目标服务定义信息;Based on the target service name included in the service uninstallation request, obtain the target service definition information of the target service from the server;
    基于所述目标服务定义信息卸载所述目标服务,并删除本地存储的所述目标服务安装包。Uninstall the target service based on the target service definition information, and delete the locally stored target service installation package.
  26. 根据权利要求19至23所述的装置,其中,所述卸载模块,还用于:The device according to claims 19 to 23, wherein the unloading module is also used for:
    在满足自动卸载条件的情况下,卸载所述目标服务,所述自动卸载条件包括如下至少一种:所述目标服务的调用次数达到次数阈值、所述目标服务在目标时长内未被调用以及所述目标服务的部署时长达到时长阈值。The target service is uninstalled when the automatic uninstallation conditions are met. The automatic uninstallation conditions include at least one of the following: the number of calls to the target service reaches a threshold, the target service has not been called within the target duration, and the target service has not been called within the target duration. The deployment duration of the target service reaches the duration threshold.
  27. 一种计算机设备,所述计算机设备包括处理器和存储器;所述存储器存储有至少一条指令,所述至少一条指令用于被所述处理器执行以实现如权利要求1至5任一所述的服务调用方法,或,实现如权利要求6至13任一所述的服务调用方法。A computer device, the computer device includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the method described in any one of claims 1 to 5 Service invocation method, or implement the service invocation method as described in any one of claims 6 to 13.
  28. 一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一条程序代码,所述程序代码由处理器加载并执行以实现如权利要求1至5任一所述的服务调用方法,或,实现如权利要求6至13任一所述的服务调用方法。A computer-readable storage medium in which at least one program code is stored, and the program code is loaded and executed by a processor to implement the service calling method as described in any one of claims 1 to 5, Or, implement the service invoking method as described in any one of claims 6 to 13.
  29. 一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储 在计算机可读存储介质中;计算机设备的处理器从所述计算机可读存储介质读取所述计算机指令,所述处理器执行所述计算机指令,使得所述计算机设备执行如权利要求1至5任一所述的服务调用方法,或,实现如权利要求6至13任一所述的服务调用方法。A computer program product, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, the The processor executes the computer instructions, so that the computer device executes the service invocation method as described in any one of claims 1 to 5, or implements the service invocation method as described in any one of claims 6 to 13.
PCT/CN2022/143347 2022-03-30 2022-12-29 Service call method and apparatus, device and storage medium WO2023185166A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210334389.8A CN114756306A (en) 2022-03-30 2022-03-30 Service calling method, device, equipment and storage medium
CN202210334389.8 2022-03-30

Publications (1)

Publication Number Publication Date
WO2023185166A1 true WO2023185166A1 (en) 2023-10-05

Family

ID=82329738

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/143347 WO2023185166A1 (en) 2022-03-30 2022-12-29 Service call method and apparatus, device and storage medium

Country Status (2)

Country Link
CN (1) CN114756306A (en)
WO (1) WO2023185166A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117155992A (en) * 2023-10-31 2023-12-01 天津市天河计算机技术有限公司 Service processing method and processing system

Families Citing this family (3)

* 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
CN115242866A (en) * 2022-07-28 2022-10-25 度小满科技(北京)有限公司 Micro-service calling method and device, electronic equipment and storage medium
CN115391598A (en) * 2022-08-29 2022-11-25 Oppo广东移动通信有限公司 Service providing method, device, terminal, storage medium and program product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109951424A (en) * 2017-12-20 2019-06-28 北京三星通信技术研究有限公司 Sharing method and relevant device
CN113329047A (en) * 2020-02-29 2021-08-31 华为技术有限公司 Distributed service scheduling method and related device
CN114064303A (en) * 2020-07-31 2022-02-18 华为技术有限公司 Remote service calling method, device, system and storage medium
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109951424A (en) * 2017-12-20 2019-06-28 北京三星通信技术研究有限公司 Sharing method and relevant device
CN113329047A (en) * 2020-02-29 2021-08-31 华为技术有限公司 Distributed service scheduling method and related device
CN114064303A (en) * 2020-07-31 2022-02-18 华为技术有限公司 Remote service calling method, device, system and storage medium
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

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117155992A (en) * 2023-10-31 2023-12-01 天津市天河计算机技术有限公司 Service processing method and processing system
CN117155992B (en) * 2023-10-31 2024-01-09 天津市天河计算机技术有限公司 Service processing method and processing system

Also Published As

Publication number Publication date
CN114756306A (en) 2022-07-15

Similar Documents

Publication Publication Date Title
WO2023185166A1 (en) Service call method and apparatus, device and storage medium
WO2023093429A1 (en) Micro-application running method and apparatus, and device, storage medium and program product
CN113748685A (en) Network-based media processing control
US9654343B2 (en) System and method for managing service characteristics
CN107038046B (en) Method and device for upgrading audio playing system and terminal
AU2019256257B2 (en) Processor core scheduling method and apparatus, terminal, and storage medium
US20210319360A1 (en) Fast and scalable multi-tenant serve pool for chatbots
KR20160061306A (en) Method and apparatus for firmware virtualization
CN112784989A (en) Inference system, inference method, electronic device, and computer storage medium
CN113806037A (en) Service calling method and device, storage medium and electronic equipment
CN111586097A (en) Network request processing method, computing device and storage medium
CN113168332B (en) Data processing method and device and mobile terminal
CN115248692A (en) Device and method for supporting cloud deployment of multiple deep learning framework models
CN114937452A (en) Service calling method and system, calling device, target device and readable storage medium
CN114217989A (en) Service calling method, device, equipment, medium and computer program between equipment
CN114222003A (en) Service calling method, system, device, equipment and storage medium
CN113572822A (en) Cloud terminal simulation control method and device, storage medium and electronic equipment
WO2023124657A1 (en) Micro-application running method and apparatus, device, storage medium, and program product
WO2023169193A1 (en) Method and device for generating smart contract
CN113268272B (en) Application delivery method, device and system based on private cloud
US11463773B2 (en) Providing activity notifications regarding digital content
CN115794445A (en) Data processing method, device and equipment based on flink and regular expression
CN111679842A (en) Application program hot update processing method, device and system
CN112346758B (en) Digital infrastructure service updating platform, updating method and electronic equipment
CN112839065B (en) Information processing method, information processing device, first equipment and storage medium

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: 22934977

Country of ref document: EP

Kind code of ref document: A1