Service calling method and device
By responding to service call requests in new energy vehicles and determining the service demand table and dependency status, the complex business logic problems caused by in-vehicle function complexity and parameter dependence are solved, and efficient service call and system stability are achieved.
Patent Information
- Application Number
- CN202311348678.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-17
- Publication Date
- 2025-04-18
AI Technical Summary
With the increase in intelligence of new energy vehicles, the complexity and parameter dependence of in-car functions have increased, resulting in complex business logic, difficulty in maintaining, and poor stability and functional iteration agility.
By responding to the service call request, determine the service requirements table corresponding to the target service, query the status of dependencies and service call parameters, determine the value of the parameter based on these states, and pass it into the target service interface to complete the call.
It realizes the decoupling of business calls and parameter search, reduces the difficulty of business development, improves service calls efficiency, and ensures the stability of the system and its functional iteration capabilities.
Smart Images

Figure CN119840381A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a service calling method and device. Background Art
[0002] With the development of new energy vehicles, the degree of intelligence of automobiles is getting higher and higher, and the relevant functions in the car are becoming more and more abundant and refined. Take the car air-conditioning system as an example. In the past, traditional car air-conditioning may only support some parameters such as switches and temperature settings. Now the intelligent air-conditioning already supports independent switching of each row of air-conditioning, independent adjustment of the temperature, wind speed and wind direction of each seat temperature zone, and supports one-button driver synchronization and other functions.
[0003] As the number of functions provided by the car increases, the business logic of the corresponding services when they are called becomes more and more complex. Many parameters are dependent on each other, and a change in one parameter requires the synchronization of all related parameters. At the same time, parameter settings and business logic are redundantly coupled together, making it difficult to maintain the business, and stability and agility of function iteration cannot be guaranteed. Summary of the invention
[0004] The present application provides a service calling method, the method comprising:
[0005] In response to a call request for a target service, determine a first service requirement table corresponding to the target service; wherein the service requirement table stores at least one dependency item corresponding to the target service, and / or a state of a service call parameter under different states of the at least one dependency item;
[0006] Querying the first service requirement table to determine at least one dependency item corresponding to the target service;
[0007] determining a state of at least one service call parameter based on a state of the at least one dependency;
[0008] Based on the state of the service call parameter, the value of the at least one service call parameter is determined, and the value of the service call parameter is passed to the interface corresponding to the target service to complete the call to the target service.
[0009] Optionally, the service call request includes an interface identifier of an interface corresponding to the target service;
[0010] The determining of the service requirement table corresponding to the target service includes:
[0011] Based on the interface identifier of the interface corresponding to the target service, a service requirement table corresponding to the interface identifier is determined.
[0012] Optionally, determining a value of the at least one service calling parameter based on a state of the service calling parameter includes:
[0013] Based on the historical parameter status table, querying the historical status of at least one service call parameter corresponding to the target service; wherein the historical parameter status table stores the historical status of the at least one service call parameter corresponding to at least one service;
[0014] Based on the state of the service calling parameter and the historical state of the service calling parameter, a value of the at least one service calling parameter is determined.
[0015] Optionally, after completing the call to the target service, the method further includes:
[0016] The historical status of the service call parameter in the historical parameter status table is updated to a status corresponding to the value of the service call parameter.
[0017] Optionally, the method further includes:
[0018] In response to the service requirement change request, a second service requirement table is obtained, and the first service requirement table maintained by the operating system is updated to the second service requirement table.
[0019] The present application provides a service calling device, the device comprising:
[0020] A service requirement table determining unit, configured to determine, in response to a call request for a target service, a first service requirement table corresponding to the target service; wherein the service requirement table stores at least one dependency item corresponding to the service, and / or a state of a service call parameter under different states of the at least one dependency item;
[0021] A dependency query unit, configured to query the first service requirement table to determine at least one dependency corresponding to the target service;
[0022] a state determination unit, configured to determine a state of at least one service call parameter based on a state of the at least one dependency;
[0023] The service calling unit is used to determine the value of the at least one service calling parameter based on the state of the service calling parameter, and pass the value of the service calling parameter to the interface corresponding to the target service to complete the call to the target service.
[0024] Optionally, the service call request includes an interface identifier of an interface corresponding to the target service;
[0025] The service requirement table determining unit is further configured to determine, based on an interface identifier of an interface corresponding to the target service, a service requirement table corresponding to the interface identifier.
[0026] Optionally, the service calling unit is further used to query the historical status of at least one service calling parameter corresponding to the target service based on the historical parameter status table; wherein the historical parameter status table stores the historical status of the at least one service calling parameter corresponding to at least one service;
[0027] Based on the state of the service calling parameter and the historical state of the service calling parameter, a value of the at least one service calling parameter is determined.
[0028] Optionally, the device further comprises:
[0029] The historical status updating unit is used to update the historical status of the service call parameter in the historical parameter status table to a status corresponding to the value of the service call parameter.
[0030] Optionally, the device further comprises:
[0031] The demand updating unit is used to obtain a second service demand table in response to a service demand change request, and update the first service demand table maintained by the operating system to the second service demand table.
[0032] The present application also provides an electronic device, comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are interconnected via the bus;
[0033] The memory stores machine-readable instructions, and the processor executes the above method by calling the machine-readable instructions.
[0034] The present application also provides a computer-readable storage medium, which stores machine-readable instructions. When the machine-readable instructions are called and executed by a processor, the above method is implemented.
[0035] In the scheme recorded in the above embodiment, when calling a service, the service requirement table can be queried, and when the status of the service's dependencies is different, the status of the service call parameter corresponding to the service can be directly determined, and the value of the service call parameter can be further determined based on the status of the service call parameter, thereby completing the service call. The decoupling of service call and parameter search is achieved, the difficulty of service development is reduced, and the efficiency of service call can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1It is a flowchart of a service calling method provided by an exemplary embodiment.
[0037] Figure 2 This is an application diagram of a service calling method provided by an exemplary embodiment.
[0038] Figure 3 It is a hardware structure diagram of an electronic device where a service calling device is located, provided by an exemplary embodiment.
[0039] Figure 4 It is a block diagram of a service calling device provided by an exemplary embodiment. DETAILED DESCRIPTION
[0040] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0041] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0042] See also Figure 1 , Figure 1 This is a flow chart of a service calling method provided by an exemplary embodiment. The method may include the following steps:
[0043] Step 102, in response to a call request for a target service, determine a first service requirement table corresponding to the target service; wherein the service requirement table stores at least one dependency corresponding to the target service, and / or the state of a service call parameter under different states of the at least one dependency.
[0044] In this specification, the target service may specifically refer to an independent functional unit that implements specific business or functional requirements in a SOA (Service-Oriented Architecture).
[0045] In one example, the target service may specifically refer to at least one service that can be provided by a new energy vehicle. The method may specifically be applied to an operating system carried by a vehicle.
[0046] In this specification, the services provided by the vehicle are generally developed based on the SOA (Service-Oriented Architecture) architecture, which is a software architecture style that promotes the development of loosely coupled, reusable and composable software systems by dividing applications into independently deployable and callable services.
[0047] In SOA architecture, applications are decomposed into a set of services, each of which represents a specific business function and communicates over the network. These services can be developed, deployed, and upgraded independently, and they communicate using standardized interfaces and protocols, such as SOAP (Simple Object Access Protocol) and REST (Representational State Transfer).
[0048] For example, in actual applications, the services may specifically include air conditioning services, vehicle management services, and intelligent driving assistance services. For air conditioning services, they may further include a series of more refined services such as turning on the front air conditioner, setting the wind speed, setting the temperature, etc.
[0049] In the present specification, the operating system may respectively maintain a service requirement table corresponding to the at least one service; the service requirement table stores at least one dependency corresponding to the service, and / or, under different states of the at least one dependency, the state of at least one service call parameter required to be set for calling the service.
[0050] The service requirement table is described in detail below with a specific example.
[0051] For example, please refer to Table 1, which is a service demand table for setting the air-conditioning temperature of the left seat in the first row, shown in an exemplary embodiment.
[0052]
[0053]
[0054] Table 1
[0055] As shown in Table 1, " / " in Table 1 indicates that it can be in any state, "Off" indicates the closed state, "On" indicates the open state, "Last" indicates using the last configuration, "Current" indicates maintaining the current configuration unchanged, and "Operation" indicates using the current operation value.
[0056] When the air conditioning temperature of the left seat in the first row needs to be set, the service corresponding to the air conditioning temperature of the left seat in the first row can be called. Before calling the service, its specific dependencies may include the first row air conditioning temperature setting master switch, the second row air conditioning temperature setting master switch, the third row air conditioning temperature setting master switch, and the air conditioning maximum wind speed switch. When the state of the dependency is different, the state of the service call parameter required to be set when calling the service is also different.
[0057] Among them, according to the arrangement and combination of the states of different dependencies, a column of the state of the dependency in the service demand table can be determined, and the state of the service call parameter can be directly obtained through this column.
[0058] For example, when the status of dependency 1 "first row air conditioning temperature setting" is "off", the status of dependency 2 "second row air conditioning temperature setting" is " / ", the status of dependency 3 "third row air conditioning temperature setting" is " / ", and the status of dependency 4 "air conditioning maximum wind speed switch" is "off". The status of each of the above dependencies can be determined in the status 1 column of the service demand table shown in Table 1, and thus the status of each service call parameter can be determined through the status 1 column. For example, it can be determined that the status of service call parameter 1 "first row air conditioning temperature setting main switch" is "On", the status of service call parameter 2 "second row air conditioning temperature setting main switch" is "Last", the status of service call parameter 3 "third row air conditioning temperature setting main switch" is "Last", the status of service call parameter 4 "first row left seat temperature setting" is "Operation", and the status of service call parameter 5 "first row right seat temperature setting" is "Last".
[0059] That is, when the dependencies corresponding to the service are all in state 1, through the state 1 column in the service requirement table, it can be determined that the states of the service call parameters are also in state 1. This means that when the first row air conditioning temperature setting master switch is off, the first row air conditioning temperature setting master switch needs to be turned on, and the temperature of the left seat in the first row is set to the temperature set for this operation. The second row air conditioning temperature setting master switch and the third row air conditioning temperature setting master switch use the switch state of the last operation. The temperature of the right seat in the first row is also set to the temperature state of the last operation.
[0060] Similarly, when the dependencies corresponding to the service are all in state 2, through the state 2 column in the service requirement table, it can be determined that the states of the service call parameters are also in state 2.
[0061] In this specification, the service requirement table may be designed in advance by a requirement designer and maintained by an operating system, and the operating system may query the service requirement table to determine the status of the service call parameters that need to be set.
[0062] In this specification, a user may initiate a service call request for a target service, wherein the specific method of initiating the service call request is not specifically limited in this specification.
[0063] For example, a user calls the air conditioning service on a new energy vehicle. The user can use the temperature and wind speed adjustment buttons or knobs on the air conditioning control panel provided by the vehicle to adjust the required temperature and wind speed. Or the user can set the temperature and wind speed on the display screen provided in the vehicle cabin to initiate a service call request.
[0064] The operating system may respond to a service call request initiated by a user and further determine a first service requirement table corresponding to the target service.
[0065] The specific method of determining the first service requirement table corresponding to the target service is not specifically limited in this specification.
[0066] For example, the service call request may specifically include a service identifier of the target service, and the operating system may determine the first service requirement table corresponding to the target service according to the service identifier of the target service. For another example, when a user initiates a service call request, a service interface corresponding to the target service may be automatically triggered, and the first service requirement table corresponding to the target service may be determined through the interface name of the service interface.
[0067] In one implementation, the service call request initiated by the user may include an interface identifier of an interface corresponding to the target service. The first service requirement table corresponds to the interface identifier in a one-to-one manner.
[0068] For example, when a user calls the air conditioning service on a new energy vehicle, when the user sets the air conditioning temperature for the left seat in the first row, the interface identifier corresponding to the service called may be TargetTemperatureSettingFirstLeft, and the operating system of the vehicle may quickly query the first service demand table corresponding to the interface identifier through the interface identifier.
[0069] Step 104: query the first service requirement table to determine at least one dependency item corresponding to the target service.
[0070] In this specification, after determining the first service requirement table corresponding to the target service, at least one dependency item corresponding to the target service may be further determined.
[0071] Taking Table 1 as an example, when the target service is to set the air conditioning temperature for the left seat in the first row, the dependencies can be determined to be the main switch for setting the air conditioning temperature in the first row, the main switch for setting the air conditioning temperature in the second row, the main switch for setting the air conditioning temperature in the third row, and the maximum wind speed switch for the air conditioning.
[0072] Step 106: Determine the state of at least one service call parameter based on the state of the at least one dependency.
[0073] In this specification, after determining at least one dependency item corresponding to the target service, the state of the at least one dependency item may be further determined.
[0074] Among them, the specific method of determining the at least one dependency is not specifically limited in this specification. For example, take the case where a user calls the air conditioning service on a new energy vehicle. When it is necessary to determine whether the main switch for setting the temperature of the first row of air conditioners is turned on, the operating system carried by the vehicle can maintain a list corresponding to the state of the air conditioning switch. The air conditioning control panel of the vehicle can usually be connected to the electrical system and send electrical signals. When the main switch of the air conditioning is turned on, the air conditioning control module will send a signal to other related modules to indicate the state of the main switch of the air conditioning. The operating system can detect these signals and update the list corresponding to the state of the air conditioning switch accordingly.
[0075] For example, the air conditioning system is usually equipped with multiple sensors, such as temperature sensors, pressure sensors, and humidity sensors, which are used to monitor changes in the vehicle environment and the operating status of the air conditioning system. When the main air conditioning switch is turned on, the relevant sensors will return real-time information to the operating system, and the operating system can use this information to determine the status of the main air conditioning switch.
[0076] After determining the state of the at least one dependency, the first service requirement table may be further queried to determine the state of the at least one service call parameter.
[0077] Taking Table 1 as an example, when the target service is to set the air conditioning temperature for the left seat in the first row, the dependencies can be determined to be the main switch for setting the air conditioning temperature in the first row, the main switch for setting the air conditioning temperature in the second row, the main switch for setting the air conditioning temperature in the third row, and the maximum wind speed switch for the air conditioning.
[0078] When the main switch for setting the temperature of the first row air conditioner is off, the status of service call parameter 1 "main switch for setting the temperature of the first row air conditioner" is determined to be on, the status of service call parameter 2 "main switch for setting the temperature of the second row air conditioner" is the status of the switch at the last operation, the status of service call parameter 3 "main switch for setting the temperature of the third row air conditioner" is the status of the switch at the last operation, the status of service call parameter 4 "temperature setting for the left seat of the first row" is the operation value used for this operation, and the status of service call parameter 5 "temperature setting for the right seat of the first row" is the operation value at the last operation.
[0079] Step 108: Determine the value of the at least one service calling parameter based on the state of the service calling parameter, and pass the value of the service calling parameter to the interface corresponding to the target service to complete the call to the target service.
[0080] After determining the state of the service call parameter, the operating system may further determine a value of at least one service call parameter.
[0081] The specific method of determining the value of at least one service call parameter is not specifically limited in this specification.
[0082] For example, taking Table 1 as an example, when the target service is to set the air conditioning temperature for the left seat in the first row. The state of service call parameter 1 "first row air conditioning temperature setting main switch" is the on state, and its corresponding value is the value corresponding to the on state. The state of service call parameter 2 "second row air conditioning temperature setting main switch" is the state of the switch at the last operation, and its corresponding value can query the state of the switch at the last operation, and determine the value corresponding to the state according to the state of the last switch. The state of service call parameter 4 "first row left seat temperature setting" is the operation value used for this operation. Its corresponding value can be the specific temperature value set by the user.
[0083] After determining the value of the at least one service calling parameter, the value of the service calling parameter may be passed into an interface corresponding to the target service to complete the call to the service.
[0084] In one implementation, the vehicle further maintains a historical parameter status table; the historical parameter status table stores a historical status of at least one service call parameter corresponding to at least one service.
[0085] The operating system may query the historical status of at least one service call parameter corresponding to the target service based on the historical parameter status table, and determine the value of the at least one service call parameter in combination with the status of the service call parameter and the historical status of the service call parameter.
[0086] For example, take the case where a user calls the air conditioning service on a new energy vehicle. The target service called by the user this time is to set the air conditioning temperature for the left seat in the first row. By querying the service demand table, it can be determined that the status of the "second row air conditioning temperature setting master switch" of the service call parameter 2 is "Last", that is, the status of the second row air conditioning temperature setting master switch is the configuration when the air conditioning temperature was set last time. At this time, the historical parameter status table can be queried to determine the historical status of the second row air conditioning temperature setting master switch when the air conditioning temperature was set last time. And based on the historical status of the second row air conditioning temperature setting master switch, the value of at least one service call parameter is determined.
[0087] In one implementation, after completing the service call for the target service, the historical parameter status table may be updated to update the historical status of at least one service call parameter corresponding to at least one service in the historical parameter status table to a status corresponding to the value of the service call parameter.
[0088] For example, a user calls the air conditioning service on a new energy vehicle. The target service called by the user this time is to set the air conditioning temperature of the left seat in the first row. The first row air conditioning temperature setting master switch needs to be turned on, so the state of the "first row air conditioning temperature setting master switch" needs to be set to the on state, and the state of the first row air conditioning temperature setting master switch in the historical parameter state table can be further updated to the on state.
[0089] In one implementation, the user may also change the service requirement table, and the operating system may obtain a second service requirement table in response to the service requirement change request, and update the first service requirement table maintained by the operating system to the second service requirement table.
[0090] The specific method of obtaining the second service requirement table is not specifically limited in this specification. For example, the second service requirement table can be sent through the cloud. For another example, the second service requirement table can be manually imported by the user, etc.
[0091] See also Figure 2 , Figure 2 This is an application diagram of a service calling method provided by an exemplary embodiment.
[0092] like Figure 2 As shown, the user can call the target service and trigger the interface corresponding to the target service.
[0093] The operating system may respond to a service call request for a target service initiated by a user and, based on an interface identifier of an interface corresponding to the service, query a first service requirement table corresponding to the interface identifier.
[0094] Furthermore, the operating system may query the first service requirement table to determine at least one dependency item corresponding to the target service.
[0095] After determining the at least one dependency, the operating system may determine a state of the at least one dependency, and further determine a state of at least one service call parameter by querying the first service requirement table.
[0096] When determining the status of at least one service call parameter, you can first determine whether it is necessary to obtain the historical status of the service call parameter. If it is necessary to obtain the historical status of the service call parameter, you can query the historical parameter status table, and determine the historical status of the service call parameter through the historical parameter status table, and then further determine the value of the service call parameter.
[0097] If there is no need to obtain the historical status of the service call parameter, the value of the service call parameter can be directly determined.
[0098] After determining the value of the service call parameter, the service call parameter may be passed into the interface corresponding to the target service to complete the call to the target service.
[0099] In the scheme recorded in the above embodiment, when calling a service, the service requirement table can be queried, and when the status of the service's dependencies is different, the status of the service call parameter corresponding to the service can be directly determined, and the value of the service call parameter can be further determined based on the status of the service call parameter, thereby completing the service call. The decoupling of service call and parameter search is achieved, the difficulty of service development is reduced, and the efficiency of service call can be improved.
[0100] Corresponding to the above-mentioned embodiments of the service calling method, this specification also provides embodiments of a service calling device.
[0101] See also Figure 3 , Figure 3 It is a hardware structure diagram of an electronic device where a service calling device is located, which is shown as an exemplary embodiment. At the hardware level, the device includes a processor 302, an internal bus 304, a network interface 306, a memory 308, and a non-volatile memory 310, and of course may also include hardware required for other services. One or more embodiments of this specification can be implemented based on software, such as the processor 303 reading the corresponding computer program from the non-volatile memory 310 into the memory 308 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0102] See also Figure 4 , Figure 4 is a block diagram of a service invocation device shown in an exemplary embodiment. The service invocation device can be applied to Figure 3 In the electronic device shown in the figure, the technical solution of this specification is implemented. Among them, the above-mentioned service calling device may include:
[0103] A service requirement table determining unit, configured to determine, in response to a call request for a target service, a first service requirement table corresponding to the target service; wherein the service requirement table stores at least one dependency item corresponding to the service, and / or a state of a service call parameter under different states of the at least one dependency item;
[0104] A dependency query unit, configured to query the first service requirement table to determine at least one dependency corresponding to the target service;
[0105] a state determination unit, configured to determine a state of at least one service call parameter based on a state of the at least one dependency;
[0106] The service calling unit is used to determine the value of the at least one service calling parameter based on the state of the service calling parameter, and pass the value of the service calling parameter to the interface corresponding to the target service to complete the call to the target service.
[0107] In this embodiment, the service call request includes an interface identifier of an interface corresponding to the target service;
[0108] The service requirement table determining unit is further configured to determine, based on an interface identifier of an interface corresponding to the target service, a service requirement table corresponding to the interface identifier.
[0109] In this embodiment, the service calling unit is further used to query the historical state of at least one service calling parameter corresponding to the target service based on the historical parameter state table; wherein the historical parameter state table stores the historical state of the at least one service calling parameter corresponding to at least one service;
[0110] Based on the state of the service calling parameter and the historical state of the service calling parameter, a value of the at least one service calling parameter is determined.
[0111] In this embodiment, the device further includes:
[0112] The historical status updating unit is used to update the historical status of the service call parameter in the historical parameter status table to a status corresponding to the value of the service call parameter.
[0113] In this embodiment, the device further includes:
[0114] The demand updating unit is used to obtain a second service demand table in response to a service demand change request, and update the first service demand table maintained by the operating system to the second service demand table.
[0115] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0116] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.
[0117] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0118] This specification also provides an embodiment of a computer-readable storage medium. The computer-readable storage medium stores machine-readable instructions, and when the machine-readable instructions are called and executed by a processor, the service calling method provided in any embodiment of this specification can be implemented.
[0119] The computer-readable storage medium provided in the embodiments of this specification may specifically include, but is not limited to, any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical fiber card. That is, the readable storage medium includes a readable medium that can store or transmit information.
[0120] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0121] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0122] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0123] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0124] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0125] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0126] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "one", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0127] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0128] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.
Claims
1. A service calling method, the method comprising: In response to a call request for a target service, determine a first service requirement table corresponding to the target service; wherein the service requirement table stores at least one dependency item corresponding to the target service, and / or a state of a service call parameter under different states of the at least one dependency item; Querying the first service requirement table to determine at least one dependency item corresponding to the target service; determining a state of at least one service call parameter based on a state of the at least one dependency; Based on the state of the service call parameter, the value of the at least one service call parameter is determined, and the value of the service call parameter is passed to the interface corresponding to the target service to complete the call to the target service.
2. The method according to claim 1, wherein the call request includes an interface identifier of an interface corresponding to the target service; The determining of a service requirement table corresponding to the target service includes: Based on the interface identifier of the interface corresponding to the target service, a service requirement table corresponding to the interface identifier is determined.
3. The method according to claim 1, determining the value of the at least one service call parameter based on the state of the service call parameter, comprising: Based on the historical parameter status table, querying the historical status of at least one service call parameter corresponding to the target service; wherein the historical parameter status table stores the historical status of the at least one service call parameter corresponding to at least one service; Based on the state of the service calling parameter and the historical state of the service calling parameter, a value of the at least one service calling parameter is determined.
4. The method according to claim 3, after completing the call to the target service, the method further comprises: The historical status of the service call parameter in the historical parameter status table is updated to a status corresponding to the value of the service call parameter.
5. The method according to claim 1, further comprising: In response to the service requirement change request, a second service requirement table is obtained, and the first service requirement table is updated to the second service requirement table.
6. A service invocation device, comprising: A service requirement table determining unit, configured to determine, in response to a call request for a target service, a first service requirement table corresponding to the target service; wherein the service requirement table stores at least one dependency item corresponding to the service, and / or a state of a service call parameter under different states of the at least one dependency item; A dependency query unit, configured to query the first service requirement table to determine at least one dependency corresponding to the target service; a state determination unit, configured to determine a state of at least one service call parameter based on a state of the at least one dependency; The service calling unit is used to determine the value of the at least one service calling parameter based on the state of the service calling parameter, and pass the value of the service calling parameter to the interface corresponding to the target service to complete the call to the target service.
7. The device according to claim 6, wherein the call request includes an interface identifier of an interface corresponding to the target service; The service requirement table determining unit is further configured to determine, based on an interface identifier of an interface corresponding to the target service, a service requirement table corresponding to the interface identifier.
8. The device according to claim 6, wherein the service calling unit is further configured to query the historical status of at least one service calling parameter corresponding to the target service based on the historical parameter status table; wherein: The historical parameter status table stores the historical status of the at least one service call parameter corresponding to at least one service; Based on the state of the service calling parameter and the historical state of the service calling parameter, a value of the at least one service calling parameter is determined.
9. The device according to claim 8, further comprising: The historical status updating unit is used to update the historical status of the service call parameter in the historical parameter status table to a status corresponding to the value of the service call parameter.
10. The device according to claim 6, further comprising: The demand updating unit is used to obtain a second service demand table in response to a service demand change request, and update the first service demand table to the second service demand table.
11. An electronic device, comprising a communication interface, a processor, a memory and a bus, wherein the communication interface, the processor and the memory are interconnected via the bus; The memory stores machine-readable instructions, and the processor executes the method according to any one of claims 1 to 5 by calling the machine-readable instructions.
12. A computer-readable storage medium storing machine-readable instructions, wherein the machine-readable instructions, when called and executed by a processor, implement the method according to any one of claims 1 to 5.