Operation result processing method, electronic device, and computer-readable storage medium
By integrating event-driven functionality into the client and server sides, generating EventBridge subscription rules and MNS queues, the problem of cumbersome processing of asynchronous OpenAPI operation results is solved, achieving efficient and real-time operation result awareness, improving user experience and ECS system performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
- Filing Date
- 2024-03-01
- Publication Date
- 2026-07-31
AI Technical Summary
The existing technology of obtaining asynchronous OpenAPI operation results by subscribing to events is cumbersome, has low processing efficiency, results in poor user experience, and puts a lot of pressure on the ECS system.
Integrate event-driven functionality between the client and server. By generating target event service information and target message service information, creating EventBridge subscription rules and MNS queues, and obtaining target configuration parameters, the system can subscribe to asynchronous OpenAPI operation results in an event-driven manner.
It simplifies the operation process, reduces the number of calls to query-type OpenAPI, reduces the pressure on the ECS system, improves processing efficiency and user experience, and enables real-time perception of task operation results.
Smart Images

Figure CN120578427B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of computer technology and cloud computing technology, and more specifically, to an operation result processing method, an electronic device, and a computer-readable storage medium. Background Technology
[0002] Elastic Compute Service (ECS) is an elastic computing service that helps users quickly deploy and manage cloud server instances, allowing them to flexibly adjust the configuration of computing resources according to their needs. ECS provides many Open Application Programming Interfaces (OpenAPIs), enabling users to manipulate ECS resources. OpenAPIs include synchronous and asynchronous ones. Synchronous OpenAPIs return results immediately, while asynchronous OpenAPIs require a delay to return results. For asynchronous OpenAPIs, polling query-type OpenAPIs is typically used to obtain asynchronous operation results. However, polling cannot provide timely results, and frequent polling leads to a high volume of query-type OpenAPI calls, frequently triggering rate limiting, resulting in a poor user experience and increased pressure on the ECS system, which is detrimental to system performance.
[0003] The cloud servers currently proposed provide a way for users to obtain operation results by creating events and subscribing to these events. For example, they provide disk creation events. After a disk is created, the disk creation event is submitted to an event bridge (EventBridge), where users can subscribe to the event. However, this approach is cumbersome and results in low processing efficiency.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This application provides an operation result processing method, an electronic device, and a computer-readable storage medium to at least solve the technical problem in the related art that obtaining operation results by subscribing to events leads to cumbersome operations and low processing efficiency.
[0006] According to one aspect of the embodiments of this application, an operation result processing method is provided, comprising: in response to an initialization configuration operation of a client, generating target event service information and target message service information, wherein the initialization configuration operation is used to initialize the software development kit of an asynchronous open application interface, the target event service information is used to determine the rules for subscribing to the operation results of the asynchronous open application interface in an event-driven manner, and the target message service information is used to transmit the operation results of the asynchronous open application interface; obtaining target configuration parameters based on the target event service information and the target message service information, wherein the target configuration parameters are configuration parameters for subscribing to the operation results of the asynchronous open application interface in an event-driven manner; and returning the target configuration parameters to the client so that the client can subscribe to the operation results of the asynchronous open application interface in an event-driven manner.
[0007] According to another aspect of the embodiments of this application, an operation result processing method is also provided, comprising: performing an initialization configuration operation on a server, wherein the initialization configuration operation is used to initialize the software development kit of an asynchronous open application interface; receiving target configuration parameters returned by the server, wherein the target configuration parameters are obtained based on target event service information and target message service information, the target configuration parameters are configuration parameters for subscribing to the operation results of the asynchronous open application interface in an event-driven manner, the target event service information is used to determine the rules for subscribing to the operation results of the asynchronous open application interface in an event-driven manner, and the target message service information is used to transmit the operation results of the asynchronous open application interface; and subscribing to the operation results of the asynchronous open application interface in an event-driven manner based on the target configuration parameters.
[0008] According to another aspect of the embodiments of this application, an operation result processing method is also provided, comprising: obtaining an operation result processing request through a first application programming interface, wherein the operation result processing request includes: target configuration parameters, the target configuration parameters being configuration parameters for subscribing to the operation result of an asynchronous open application programming interface in an event-driven manner, the target configuration parameters being obtained based on target event service information and target message service information, the target event service information being used to determine the rules for subscribing to the operation result of the asynchronous open application programming interface in an event-driven manner, and the target message service information being used to transmit the operation result of the asynchronous open application programming interface; and returning an operation result processing response through a second application programming interface, wherein the operation result processing response includes: the operation result of the asynchronous open application programming interface.
[0009] According to another aspect of the embodiments of this application, an operation result processing method is also provided, comprising: obtaining a currently input operation result processing dialog request, wherein the operation result processing dialog request includes: target configuration parameters, the target configuration parameters being configuration parameters for subscribing to asynchronous open application interface operation results via an event-driven approach, the target configuration parameters being obtained based on target event service information and target message service information, the target event service information being used to determine the rules for subscribing to asynchronous open application interface operation results via an event-driven approach, and the target message service information being used to transmit the asynchronous open application interface operation results; responding to the operation result processing dialog request, returning an operation result processing dialog response, wherein the operation result processing dialog response includes: the asynchronous open application interface operation results; and displaying the asynchronous open application interface operation results within a graphical user interface.
[0010] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes any of the above-described operation result processing methods during runtime.
[0011] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, which includes a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform any of the above-described operation result processing methods.
[0012] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements any of the above-described operation result processing methods.
[0013] In this embodiment, after receiving the client's initialization configuration operation (i.e., after receiving the operation to initialize the SDK of the asynchronous OpenAPI), the initialization configuration is completed, and target event service information for determining the rules for subscribing to the results of asynchronous OpenAPI operations in an event-driven manner and target message service information for transmitting the results of asynchronous OpenAPI operations are generated. This involves creating EventBridge subscription rules and an MNS queue, then obtaining the corresponding target configuration parameters for subscribing to the results of asynchronous OpenAPI operations in an event-driven manner based on the EventBridge subscription rules and the MNS queue, and finally returning these target configuration parameters to the client. This enables the client to subscribe to the results of asynchronous OpenAPI operations in an event-driven manner, achieving the goal of subscribing to the results of asynchronous OpenAPI operations in an event-driven manner through simple operations and real-time perception of task operation results. This reduces the number of calls to query-type OpenAPIs, reduces ECS system pressure, improves ECS system processing efficiency, provides real-time perception of task operation results, and enhances user experience. Furthermore, it solves the technical problem in related technologies where obtaining operation results through event subscription leads to cumbersome operations and low processing efficiency.
[0014] It is worth noting that the general description above and the detailed description that follow are merely for illustrative purposes and do not constitute a limitation on this application. Attached Figure Description
[0015] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0016] Figure 1 This is a hardware structure block diagram of a computer terminal (or mobile device) for implementing an operation result processing method according to Embodiment 1 of this application;
[0017] Figure 2 This is a flowchart of an operation result processing method according to Embodiment 1 of this application;
[0018] Figure 3 This is a flowchart of publishing an OpenAPI according to Embodiment 1 of this application;
[0019] Figure 4 This is a flowchart illustrating an event-driven subscription to the result of an asynchronous OpenAPI operation according to Embodiment 1 of this application;
[0020] Figure 5 This is a flowchart of an operation result processing method according to Embodiment 2 of this application;
[0021] Figure 6 This is a flowchart of an operation result processing method according to Embodiment 3 of this application;
[0022] Figure 7 This is a flowchart of an operation result processing method according to Embodiment 4 of this application;
[0023] Figure 8 This is a schematic diagram of an operation result processing device according to Embodiment 5 of this application;
[0024] Figure 9 This is a schematic diagram of another operation result processing device according to Embodiment 5 of this application;
[0025] Figure 10 This is a schematic diagram of the structure of another operation result processing device according to Embodiment 5 of this application;
[0026] Figure 11 This is a schematic diagram of the structure of another operation result processing device according to Embodiment 5 of this application;
[0027] Figure 12 This is a structural block diagram of a computer terminal according to an embodiment of this application. Detailed Implementation
[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0030] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:
[0031] Elastic Compute Service (ECS) is a flexible, secure, stable, and high-performance cloud computing service that allows users to rent virtual machine instances in the cloud, including central processing units (CPUs), memory, storage, and network resources to meet various computing needs. Users can purchase, release, and manage these virtual machine instances at any time according to their needs, achieving elastic allocation of computing resources. ECS also provides various instance types and configuration options, as well as support for multiple operating systems and application environments to meet the needs of different workloads.
[0032] Open Application Programming Interface (OpenAPI): In the internet age, encapsulating a website's services into a series of easily recognizable data interfaces and making them available to third-party developers is called opening a website's Application Programming Interface (API). Correspondingly, the exposed API is called an OpenAPI.
[0033] EventBridge: A central event hub located in the cloud, providing a unified event center and using standardized protocols to facilitate the management of events generated within cloud products, Software as a Service (SaaS) products, and user management task domains. In this embodiment, users can build loosely coupled, distributed event-driven architectures through events.
[0034] Events: These are ECS events used to record and notify information about cloud resources, such as the execution status of operation and maintenance tasks, whether resources are abnormal, and changes in resource status.
[0035] Event-Driven Architecture (EDA) is a modern architectural pattern built from small, decoupled services that publish, use, or route events. Events represent changes or updates to state, such as items added to a shopping cart, files uploaded to storage, or orders ready to ship. Events can carry state (such as the name, price, or quantity of items in an order) or simply contain identifiers needed to find relevant information (e.g., "Order #8942 has shipped"). Unlike traditional request-driven models, EDA promotes loose coupling between producer and consumer services, making it easier to scale, update, and independently deploy individual components of the system.
[0036] Platform of Platforms (POP): This is a platform that integrates multiple API services to help developers manage and use multiple APIs on the same platform.
[0037] The related technology, which creates events and allows users to obtain operation results by subscribing to those events, has the following drawbacks.
[0038] Defect 1: The entire solution consists of documents, making the operation process rather cumbersome.
[0039] Defect 2: It covers relatively few OpenAPIs and is not specifically designed for asynchronous OpenAPIs, so it cannot cover all asynchronous OpenAPIs.
[0040] Defect 3: There is no introduction about events on the API page, and event-driven programming is not integrated into the API SDK, which is quite disjointed.
[0041] To address the aforementioned deficiencies, no effective solution has been proposed prior to this application.
[0042] Example 1
[0043] According to an embodiment of this application, an operation result processing method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0044] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 This is a hardware structure block diagram of a computer terminal (or mobile device) for implementing an operation result processing method according to Embodiment 1 of this application. Figure 1As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor (MCU) or a field-programmable gate array (FPGA) or similar processing device), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O) interface, a Universal Serial Bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0045] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0046] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the operation result processing method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the above-mentioned operation result processing method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0047] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0048] The display can be, for example, a touchscreen liquid crystal display (LCD), which allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0049] Under the aforementioned operating environment, this application provides the following: Figure 2 The method for processing the operation results is shown. Figure 2 This is a flowchart of an operation result processing method according to Embodiment 1 of this application. Figure 2 As shown, the method may include the following steps:
[0050] Step S21: In response to the client's initialization configuration operation, target event service information and target message service information are generated. The initialization configuration operation is used to initialize the software development kit of the asynchronous open application interface. The target event service information is used to determine the rules for subscribing to the operation results of the asynchronous open application interface in an event-driven manner. The target message service information is used to transmit the operation results of the asynchronous open application interface.
[0051] Step S22: Obtain target configuration parameters based on target event service information and target message service information, wherein the target configuration parameters are configuration parameters for subscribing to the operation results of asynchronous open application interface through event-driven method;
[0052] Step S23: Return the target configuration parameters to the client so that the client can subscribe to the results of asynchronous open application programming interface operations in an event-driven manner.
[0053] The client, or user side, can be understood as the device used by the user, such as a personal computer, smartphone, or tablet; there are no restrictions here. The client can connect to the server via a network and send requests to the server to obtain data or perform specific operations.
[0054] The initialization configuration operation is used to initialize and configure the Software Development Kit (SDK) for the asynchronous Open Application Programming Interface (OpenAPI), that is, to initialize and configure the SDK for the asynchronous OpenAPI. By initializing and configuring the SDK, the SDK is equipped with the necessary authentication, networking, and behavioral capabilities when communicating with the asynchronous OpenAPI, enabling the SDK to better adapt to different use cases and have better stability, performance, and maintainability.
[0055] The target event service information can be understood as the EventBridge subscription rules, used to determine the rules for subscribing to the results of asynchronous OpenAPI operations in an event-driven manner. In this embodiment, to avoid the problems of polling leading to delayed results and high call volume of query-type OpenAPIs, an event-driven method is adopted to subscribe to the results of asynchronous OpenAPI operations in a timely manner. The target event service information can be understood as the rules defined by this method.
[0056] The target message service information can be understood as a message service (MNS) queue, which is used to transmit the results of asynchronous OpenAPI operations, that is, to transmit the execution status and results of asynchronous operations executed through asynchronous OpenAPI.
[0057] The target configuration parameters are those for subscribing to the results of asynchronous OpenAPI operations via an event-driven approach. Each asynchronous OpenAPI operation corresponds to an event, resulting in various event types. For example, calling an asynchronous OpenAPI instance for an additional network interface will generate a "Call for Additional Network Interface Complete" event upon completion of the entire operation. The target configuration parameters can be understood as the configuration parameters required to subscribe to these events; different events correspond to different configuration parameters.
[0058] For example, configuration parameters may include the MNS queue name, the MNS queue access address (endpoint), the user login account information, etc., which are not limited here.
[0059] In this embodiment, after receiving the client's initialization configuration operation (i.e., after receiving the operation to initialize the SDK for the asynchronous OpenAPI), the server completes the initialization configuration and generates target event service information for determining the rules for subscribing to the results of asynchronous OpenAPI operations via event-driven methods, and target message service information for transmitting the results of asynchronous OpenAPI operations. This involves creating EventBridge subscription rules and an MNS queue. Then, based on the EventBridge subscription rules and the MNS queue, the server obtains the corresponding target configuration parameters for subscribing to the results of asynchronous OpenAPI operations via event-driven methods. Finally, the server returns these target configuration parameters to the client, enabling the client to subscribe to the results of asynchronous OpenAPI operations via event-driven methods. It can be seen that this application, by integrating event-driven functionality into the SDK and subscribing to the results of asynchronous OpenAPI operations via event-driven methods, allows users to easily use event-driven services with only simple configuration, enabling them to perceive task operation results in real time. This reduces the number of calls to query-type OpenAPIs, lowers the pressure on the ECS system, and avoids the problem of high call volume to query-type OpenAPIs due to frequent polling on the ECS system, triggering rate limiting. This provides users with a more efficient and convenient service experience. Thus, the goal of subscribing to asynchronous OpenAPI operation results through an event-driven approach with simple operations is achieved, enabling real-time perception of task operation results. This reduces the number of calls to query-type OpenAPIs, lowers the load on the ECS system, improves the processing efficiency of the ECS system, provides real-time perception of task operation results, and enhances the user experience.
[0060] The operation result processing method provided in this application embodiment can be applied, but is not limited to, to application scenarios involving resource manipulation through interfaces in fields such as e-commerce services, education services, legal services, medical services, conference services, social networking services, financial product services, logistics services, and navigation services. For example, resource manipulation through interfaces in e-commerce service scenarios, resource manipulation through interfaces in education service scenarios, resource manipulation through interfaces in legal service scenarios, etc., and there are no restrictions here.
[0061] By adopting the embodiments of this application, after receiving the client's initialization configuration operation, i.e., after receiving the operation to initialize the SDK of the asynchronous OpenAPI, the initialization configuration is completed, and target event service information for determining the rules for subscribing to the results of asynchronous OpenAPI operations in an event-driven manner and target message service information for transmitting the results of asynchronous OpenAPI operations are generated. That is, EventBridge subscription rules and MNS queues are created. Then, based on the EventBridge subscription rules and MNS queues, the corresponding target configuration parameters for subscribing to the results of asynchronous OpenAPI operations in an event-driven manner are obtained. Finally, the target configuration parameters are returned to the client, enabling the client to subscribe to the results of asynchronous OpenAPI operations in an event-driven manner. This achieves the goal of subscribing to the results of asynchronous OpenAPI operations in an event-driven manner through simple operations and real-time perception of task operation results. This reduces the number of calls to query-type OpenAPIs, reduces the pressure on the ECS system, improves the processing efficiency of the ECS system, provides real-time perception of task operation results, and improves the user experience. In turn, it solves the technical problem in related technologies where obtaining operation results by subscribing to events leads to cumbersome operations and low processing efficiency.
[0062] In an optional embodiment, the operation result processing method further includes the following method steps:
[0063] Step S241: Identify the application programming interface to be published as an asynchronous open application programming interface, wherein the asynchronous open application programming interface is used to call cloud server resources to execute the target cloud service;
[0064] Step S242: Select the target event corresponding to the asynchronous open application programming interface, wherein the target event is used to determine that the target cloud service has been completed;
[0065] Step S243: Publish the asynchronous open application interface and event-driven integration documentation, wherein the event-driven integration documentation is used to provide a documented description of the operation results of subscribing to the asynchronous open application interface in an event-driven manner.
[0066] In this embodiment of the application, the OpenAPI can also be published. It is understood that publishing the OpenAPI includes publishing synchronous OpenAPI and asynchronous OpenAPI.
[0067] Cloud server resources are also known as ECS resources. They can be understood as various manageable computing resources on a cloud server ECS, including virtual machine instances, storage, network configurations, security group settings, etc. There are no restrictions here.
[0068] It is understandable that users execute different tasks by calling different asynchronous OpenAPIs, and when a task is completed, an event indicating that the task has been completed is generated. In this embodiment, the target event is the event corresponding to the asynchronous OpenAPI, used to determine that the target cloud service executed by calling the asynchronous OpenAPI has been completed.
[0069] It is understandable that when an OpenAPI is released, an OpenAPI description document is usually also released to describe and define the OpenAPI, so that client applications can understand how to interact with the OpenAPI. In this embodiment, the event-driven integration document can be understood as integrating the OpenAPI description document that subscribes to the results of asynchronous OpenAPI operations in an event-driven manner. That is, it adds a description of the event-driven subscription to the results of asynchronous OpenAPI operations to the OpenAPI description document, providing a description of the event-driven subscription to the results of asynchronous open application interface operations.
[0070] In this embodiment, when publishing an asynchronous OpenAPI, the application interface to be published can first be identified as an asynchronous open application interface, that is, the API to be published can be identified as an asynchronous OpenAPI. In this embodiment, the asynchronous OpenAPI can execute corresponding cloud services by calling ECS resources. After identifying the asynchronous OpenAPI, a target event corresponding to the asynchronous OpenAPI can be selected so that by generating the target event, it can be determined that the target cloud service executed by calling the asynchronous OpenAPI has been completed. Then, the asynchronous OpenAPI is published, along with an event-driven integration document that provides a description of the results of asynchronous OpenAPI operations in an event-driven manner.
[0071] For example, the API publisher can mark the API to be published as an asynchronous OpenAPI and publish the API marked as asynchronous OpenAPI to the POP platform. The POP platform can then select the target event corresponding to the completion of the asynchronous business of the asynchronous OpenAPI, and then publish the event-driven integration documentation to the API documentation on the official website. There are no restrictions here.
[0072] In an optional embodiment, step S22, obtaining the target configuration parameters based on the target event service information and the target message service information, includes the following method steps:
[0073] Step S221: Determine the event handling method for the target event based on the target event service information, wherein the event handling method is used to determine the event mode and the event target;
[0074] Step S222: Determine the configuration content of the target message service information using event handling methods;
[0075] Step S223: Generate target configuration parameters based on the content to be configured.
[0076] In this embodiment, the target event service information, i.e., the EventBridge subscription rule, can be understood as the rule defined in EventBridge, i.e., the EventBridge event rule, which is used to capture specific types of events and route them to specified event targets. EventBridge event rules can be filtered and matched based on conditions such as event mode, event source, and event target, thereby enabling the monitoring and processing of specific events.
[0077] For example, an event pattern can be understood as a pattern or regularity in the occurrence of events, which can be a regularity in terms of time, location, characteristics, etc. An event source can be understood as the initiator or producer of the event, which can be a system, a device, a user, etc. An event target refers to the object that the event rules match or process, which can be an alarm, a notification, an action, etc., without limitation here.
[0078] In this embodiment of the application, the EventBridge filters events by event patterns and routes events to event targets. The event processing method is used to determine the event pattern and event target of the target event.
[0079] The configuration details can include the MNS queue name, the MNS queue access address (endpoint), and the user login account information, etc., and there are no restrictions here.
[0080] In this embodiment of the application, when obtaining target configuration parameters based on target event service information and target message service information, the event processing method of the target event can be determined based on the target event service information. That is, the event mode and event target of the target event can be determined through EventBridge event rules. Then, the content to be configured in the target message service information can be determined using the event mode and event target, and the corresponding target configuration parameters can be generated through the content to be configured.
[0081] In an optional embodiment, step S221, determining the event handling method for the target event based on the target event service information, includes the following method steps:
[0082] Step S2211: Obtain the event source, event type, service type, queue identifier, and message body type corresponding to the target event based on the target event service information;
[0083] Step S2212: Determine the event pattern using the event source and event type, and determine the event target using the service type, queue identifier, and message body type. The event pattern is used to filter target events, and the event target is used to determine the delivery object of the target event.
[0084] In this embodiment of the application, in the event rules, the event source refers to the initiator of the event or the service that generated the event. It refers to the source of the event, which can be an ECS service, a third-party service, a custom application, etc., and is not limited here. Specifying the event source helps the event rules filter and process only events from specific sources.
[0085] The event type refers to the event type corresponding to the asynchronous OpenAPI, indicating the kind or category of the event. Different event types may correspond to different operations or behaviors. By specifying the event type, event rules can be made to process only specific types of events, thereby achieving more precise event handling.
[0086] The service type indicates the service to which the event belongs. For example, if the MNS protocol is selected, different services will generate different events. By specifying the service type, the event rules can be made to process only events of a specific service type.
[0087] Queue identifiers refer to queue identifiers associated with events, such as the identifier of a created MNS queue. Queue identifiers can be used to specify which queue a message should be sent to.
[0088] The message body type indicates the type of data carried by the event. Events typically carry some related data, and specifying the message body type helps event rules correctly parse and process this data. For example, the data carried by the event can be filtered to only take certain fields. The message body type can be a complete event, a partial event, a fixed value, a template, etc., and there are no restrictions here.
[0089] In this embodiment of the application, when determining the event processing method of a target event based on the target event service information, the event source, event type, service type, queue identifier, and message body type corresponding to the target event can be obtained based on the target event service information. Then, the event mode can be determined by using the event source and event type, and the event target can be determined by using the service type, queue identifier, and message body type.
[0090] In an optional embodiment, the operation result processing method further includes the following method steps:
[0091] Step S251: Generate a software development kit based on event-driven code, wherein the event-driven code is code that subscribes to the results of asynchronous open application programming interface operations in an event-driven manner;
[0092] Step S252: Release the software development kit.
[0093] In this embodiment of the application, when integrating event-driven functionality into the SDK, the SDK can be generated based on event-driven code. That is, the generated SDK contains code that subscribes to the results of asynchronous OpenAPI operations through event-driven mechanisms. Then, the SDK is published, so that users only need to configure it to complete the event subscription.
[0094] For example, the API publisher can publish the API SDK to the POP platform, and then the POP platform can integrate the code for event-driven subscription of asynchronous OpenAPI operation results into the SDK, thereby realizing the publication of the OpenAPI SDK. There are no restrictions here.
[0095] In an optional embodiment, the operation result processing method further includes the following method steps:
[0096] Step S261: Receive a code configuration request from the client, wherein the code configuration request includes: target configuration parameters;
[0097] Step S262: Configure the target configuration parameters into the event-driven code of the software development kit.
[0098] In this embodiment, the server may also receive a code configuration request from the client. This request carries target configuration parameters, such as the MNS queue name, the MNS queue's endpoint, and the user's login account information. After receiving the code configuration request from the client, the server configures the target parameters into the SDK's event-driven code, thereby enabling the subscription to asynchronous OpenAPI operation results via an event-driven approach.
[0099] In an optional embodiment, the operation result processing method further includes the following method steps:
[0100] Step S271: In response to the client's document viewing request, display the event-driven integration documentation to the client;
[0101] Step S272: In response to the authorization message initiated by the client based on the event-driven integration document, the event service and message service are authorized. The event service is used to subscribe to the target event through the client and deliver the target event to the message queue corresponding to the message service using the transmission protocol corresponding to the message service. The message service is used to subscribe to the target event through the client and deliver the target event to the client.
[0102] The event service can be an EventBridge service, used to allow clients to subscribe to target events and deliver the target events to the message queue corresponding to the message service (i.e., the MNS service) using the transport protocol corresponding to the message service. In this embodiment, the ECS delivers the event to the EventBridge, and then the EventBridge delivers the event to the user side according to the configured protocol. Enabling EventBridge service authorization allows users to select a suitable protocol (such as the MNS protocol) to subscribe to events through EventBridge.
[0103] The messaging service can be the MNS service, used to deliver target events to clients after they subscribe to those events. MNS is a highly efficient, reliable, secure, convenient, and elastically scalable distributed messaging service that helps developers freely exchange data and notification messages between distributed components of an application, thereby building loosely coupled systems. In this embodiment, enabling MNS service authorization allows users to select the MNS protocol after an event arrives at the EventBridge. The EventBridge then reaches the user through the MNS messaging service, allowing the user to subscribe to events via MNS in their code.
[0104] In this embodiment, the server may also receive document viewing requests and authorization messages from the client. If the server receives a document viewing request from the client, it can display the event-driven integration documentation to the client, enabling the user to view the documentation and perform event access based on it. It is understood that if the user is familiar with the documentation, they do not need to view it; however, if it is the user's first time using the service, they will need to view the documentation.
[0105] If the server receives an authorization message from the client based on the event-driven integration documentation, it can then authorize the event service and message service accordingly, that is, enable the EventBridge service and the MNS service.
[0106] In an optional embodiment, step S21, generating target event service information and target message service information, includes the following method steps:
[0107] Step S211: Using the software development kit, call the event service to generate target event service information, and call the message service to generate target message service information.
[0108] In this embodiment of the application, when generating target event service information and target message service information, the target event service information can be generated by calling the event service through the software development kit, and the target message service information can be generated by calling the message service. That is, the EventBridge subscription rules can be generated by calling the EventBridge service through the SDK with integrated event-driven code, and the MNS queue can be generated by calling the MNS service.
[0109] In an optional embodiment, the operation result processing method further includes the following method steps:
[0110] Step S281: In response to the client's subscription rule query request, the target event subscription rule is queried and maintained through the event service.
[0111] In this embodiment of the application, the server may also receive a subscription rule query request from the client. After receiving the subscription rule query request from the client, the server can query and maintain the target event subscription rule through the event service, so that the user can view and maintain the created EventBridge subscription rule in EventBridge.
[0112] In an optional embodiment, the operation result processing method further includes the following method steps:
[0113] Step S291: In response to the client's message queue query request, the target event message queue is queried and maintained through the message service.
[0114] In this embodiment of the application, the server may also receive a message queue query request from the client. After receiving the message queue query request from the client, the server can query and maintain the target event message queue through the message service, so that the user can view and maintain the created MNS queue in MNS.
[0115] Figure 3 This is a flowchart of an OpenAPI deployment process according to Embodiment 1 of this application, as follows: Figure 3 As shown, the API publisher marks the API to be published as an asynchronous OpenAPI and publishes the API marked as asynchronous OpenAPI to the POP platform. The POP platform selects the target event corresponding to the completion of the asynchronous business execution of the asynchronous OpenAPI, and then publishes the event-driven integration documentation to the official API documentation to complete the API publication.
[0116] In addition, the API publisher can publish the API SDK to the POP platform, and then the POP platform can integrate the code for event-driven subscription of asynchronous OpenAPI operation results into the SDK and publish the OpenAPI SDK to complete the SDK publication.
[0117] Figure 4 This is a flowchart illustrating an event-driven subscription to the result of an asynchronous OpenAPI operation according to Embodiment 1 of this application, as shown below. Figure 4 As shown, API users can view the official API documentation generated when publishing an API, and then access events based on the documentation.
[0118] API users can also initiate authorization messages to enable the EventBridge service and the Message Queue (MNS) service, thereby enabling the corresponding EventBridge and MNS services on the server side.
[0119] API users can also specify the target event to be executed, initialize the published OpenAPISDK, and create MNS queues and EventBridge subscription rules through OpenAPISDK. OpenAPISDK receives MNS queue information returned by MSN and returns the configuration parameters required for subscribing to events to API users, such as MNS queue name and MNS queue access address.
[0120] After receiving the configuration parameters, API users can further configure the parameters and subscribe to events through the OpenAPISDK.
[0121] API users can also initiate subscription rule viewing requests to view and maintain the EventBridge subscription rules they have created in EventBridge.
[0122] API users can also initiate message queue lookup requests to view and maintain created MNS queues in MNS.
[0123] As can be seen, users can authorize the product according to the OpenAPI event-driven documentation, and then subscribe to the results of asynchronous OpenAPI operations via event-driven methods through simple configuration in the SDK. This avoids the poor experience of polling and thus provides a better user experience. Furthermore, it reduces the number of OpenAPI queries, lowering the load on the ECS system.
[0124] It is easy to understand that the beneficial effects of the operation result processing method provided in this application include the following points.
[0125] Beneficial effects (1) This application integrates event-driven code into the OpenAPI SDK. Users only need to make simple configurations to subscribe to the results of asynchronous OpenAPI operations in an event-driven manner, thus making the operation process simpler.
[0126] Beneficial effect (2): For each API in this application, you only need to select the corresponding event-driven event name on the API publishing platform to automatically publish the OpenAPI documentation. At the same time, the OpenAPI SDK provided by this application can easily cover each asynchronous OpenAPI and can cover a large number of OpenAPIs.
[0127] Beneficial effects (3): This application deeply integrates event-driven and asynchronous OpenAPI. The entire process of OpenAPI configuration, OpenAPI documentation publication and OpenAPI SDK is integrated with event-driven, and introduced in the API description document so that client applications can understand how to interact with the OpenAPI.
[0128] Beneficial effects (4): Based on the ECS event-driven architecture SDK and MNS transmission protocol, this application can avoid polling, reduce the pressure on the ECS system, perceive the results of business operations in real time, and bring users a more efficient and convenient service experience.
[0129] It should be noted that 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, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0130] Furthermore, it should be noted that, for the sake of simplicity, the aforementioned method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Secondly, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0131] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, they can also be implemented by hardware. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0132] Example 2
[0133] In the operating environment as described in Example 1, this application provides as follows: Figure 5 The method shown is for processing operation results. Figure 5 This is a flowchart of an operation result processing method according to Embodiment 2 of this application, as follows: Figure 5 As shown, the method includes:
[0134] Step S51: Perform initialization configuration operation on the server, wherein the initialization configuration operation is used to initialize the software development kit for the asynchronous open application interface;
[0135] Step S52: Receive the target configuration parameters returned by the server. The target configuration parameters are obtained based on the target event service information and the target message service information. The target configuration parameters are the configuration parameters for subscribing to the results of asynchronous open application interface operations in an event-driven manner. The target event service information is used to determine the rules for subscribing to the results of asynchronous open application interface operations in an event-driven manner. The target message service information is used to transmit the results of asynchronous open application interface operations.
[0136] Step S53: Based on the target configuration parameters, subscribe to the asynchronous open application programming interface operation results in an event-driven manner.
[0137] The server, also known as the service side, is typically a dedicated server for handling requests. It can receive requests from clients, process these requests, and return corresponding data or perform corresponding operations to the clients.
[0138] The initialization configuration operation is used to initialize and configure the Software Development Kit (SDK) for the asynchronous Open Application Programming Interface (OpenAPI), that is, to initialize and configure the SDK for the asynchronous OpenAPI. By initializing and configuring the SDK, the SDK is equipped with the necessary authentication, networking, and behavioral capabilities when communicating with the asynchronous OpenAPI, enabling the SDK to better adapt to different use cases and have better stability, performance, and maintainability.
[0139] The target event service information can be understood as the EventBridge subscription rules, used to determine the rules for subscribing to the results of asynchronous OpenAPI operations in an event-driven manner. In this embodiment, to avoid the problems of polling leading to delayed results and high call volume of query-type OpenAPIs, an event-driven method is adopted to subscribe to the results of asynchronous OpenAPI operations in a timely manner. The target event service information can be understood as the rules defined by this method.
[0140] The target message service information can be understood as a message service (MNS) queue, which is used to transmit the results of asynchronous OpenAPI operations, that is, to transmit the execution status and results of asynchronous operations executed through asynchronous OpenAPI.
[0141] The target configuration parameters are those for subscribing to the results of asynchronous OpenAPI operations via an event-driven approach. Each asynchronous OpenAPI operation corresponds to an event, resulting in various event types. For example, calling an asynchronous OpenAPI instance for an additional network interface will generate a "Call for Additional Network Interface Complete" event upon completion of the entire operation. The target configuration parameters can be understood as the configuration parameters required to subscribe to these events; different events correspond to different configuration parameters.
[0142] For example, configuration parameters may include the MNS queue name, the MNS queue access address (endpoint), the user login account information, etc., which are not limited here.
[0143] In this embodiment, the client can perform initialization configuration operations on the server, that is, initialize the SDK of the asynchronous OpenAPI to generate target event service information and target message service information on the server, i.e., create EventBridge subscription rules and MNS queues. Then, the client receives the target configuration parameters returned by the server based on the EventBridge subscription rules and MNS queues. The target configuration parameters are obtained based on the target event service information and target message service information. Finally, based on the target configuration parameters, the client subscribes to the operation results of the asynchronous open application interface in an event-driven manner. It can be seen that this application integrates event-driven functionality into the SDK and subscribes to the operation results of asynchronous OpenAPI in an event-driven manner. This allows users to easily use event-driven services with only simple configuration and perceive the results of task operations in real time. This reduces the number of calls to query-type OpenAPI, reduces the pressure on the ECS system, and avoids the problem of high call volume of query-type OpenAPI due to frequent polling of the ECS system, which triggers rate limiting. This brings users a more efficient and convenient service experience. Thus, the goal of subscribing to asynchronous OpenAPI operation results through an event-driven approach with simple operations is achieved, enabling real-time perception of task operation results. This reduces the number of calls to query-type OpenAPIs, lowers the load on the ECS system, improves the processing efficiency of the ECS system, provides real-time perception of task operation results, and enhances the user experience.
[0144] The operation result processing method provided in this application embodiment can be applied, but is not limited to, to application scenarios involving resource manipulation through interfaces in fields such as e-commerce services, education services, legal services, medical services, conference services, social networking services, financial product services, logistics services, and navigation services. For example, resource manipulation through interfaces in e-commerce service scenarios, resource manipulation through interfaces in education service scenarios, resource manipulation through interfaces in legal service scenarios, etc., and there are no restrictions here.
[0145] By employing the embodiments of this application, an initialization configuration operation is performed on the server side, namely, the initialization configuration of the asynchronous OpenAPI SDK, to generate target event service information and target message service information on the server side, that is, to create EventBridge subscription rules and MNS queues. Then, the target configuration parameters returned by the server are received based on the EventBridge subscription rules and MNS queues, wherein the target configuration parameters are obtained based on the target event service information and target message service information. Finally, based on the target configuration parameters, the results of asynchronous open application interface operations are subscribed to in an event-driven manner. This achieves the goal of subscribing to asynchronous OpenAPI operation results in an event-driven manner through simple operations, and realizing the real-time perception of task operation results. This achieves the technical effects of reducing the number of calls to query-type OpenAPIs, reducing the pressure on the ECS system, improving the processing efficiency of the ECS system, realizing the real-time perception of task operation results, and improving the user experience. In turn, it solves the technical problem in related technologies that obtaining operation results by subscribing to events leads to cumbersome operations and low processing efficiency.
[0146] It should be noted that the preferred implementation of this embodiment can be found in the relevant description in Embodiment 1, and will not be repeated here.
[0147] Example 3
[0148] In the operating environment as described in Example 1, this application provides as follows: Figure 6 This illustrates a method for processing operation results. Figure 6 This is a flowchart of an operation result processing method according to Embodiment 3 of this application, as follows: Figure 6 As shown, the method includes:
[0149] Step S61: Obtain an operation result processing request through the first application programming interface. The operation result processing request includes: target configuration parameters, which are configuration parameters for subscribing to the operation results of the asynchronous open application programming interface in an event-driven manner. The target configuration parameters are obtained based on target event service information and target message service information. The target event service information is used to determine the rules for subscribing to the operation results of the asynchronous open application programming interface in an event-driven manner, and the target message service information is used to transmit the operation results of the asynchronous open application programming interface.
[0150] Step S62: Return the operation result processing response through the second application programming interface, wherein the operation result processing response includes: the asynchronous open application programming interface operation result.
[0151] The initialization configuration operation is used to initialize and configure the Software Development Kit (SDK) for the asynchronous Open Application Programming Interface (OpenAPI), that is, to initialize and configure the SDK for the asynchronous OpenAPI. By initializing and configuring the SDK, the SDK is equipped with the necessary authentication, networking, and behavioral capabilities when communicating with the asynchronous OpenAPI, enabling the SDK to better adapt to different use cases and have better stability, performance, and maintainability.
[0152] The target event service information can be understood as the EventBridge subscription rules, used to determine the rules for subscribing to the results of asynchronous OpenAPI operations in an event-driven manner. In this embodiment, to avoid the problems of polling leading to delayed results and high call volume of query-type OpenAPIs, an event-driven method is adopted to subscribe to the results of asynchronous OpenAPI operations in a timely manner. The target event service information can be understood as the rules defined by this method.
[0153] The target message service information can be understood as a message service (MNS) queue, which is used to transmit the results of asynchronous OpenAPI operations, that is, to transmit the execution status and results of asynchronous operations executed through asynchronous OpenAPI.
[0154] The target configuration parameters are those for subscribing to the results of asynchronous OpenAPI operations via an event-driven approach. Each asynchronous OpenAPI operation corresponds to an event, resulting in various event types. For example, calling an asynchronous OpenAPI instance for an additional network interface will generate a "Call for Additional Network Interface Complete" event upon completion of the entire operation. The target configuration parameters can be understood as the configuration parameters required to subscribe to these events; different events correspond to different configuration parameters.
[0155] For example, configuration parameters may include the MNS queue name, the MNS queue access address (endpoint), the user login account information, etc., which are not limited here.
[0156] In this embodiment, an operation result processing request is obtained through a first application programming interface (API). This request includes target configuration parameters, which are configuration parameters for subscribing to asynchronous open API operation results via an event-driven approach. These parameters are obtained based on target event service information and target message service information. The target event service information is used to determine the rules for subscribing to asynchronous open API operation results via an event-driven approach, and the target message service information is used to transmit the asynchronous open API operation results. Then, an operation result processing response is returned through a second API, including the asynchronous open API operation results. It can be seen that this application integrates event-driven functionality into the SDK, allowing users to subscribe to asynchronous OpenAPI operation results via an event-driven approach. This enables users to easily use event-driven services with simple configuration, perceive task operation results in real time, reduce the number of calls to query-type OpenAPIs, lower the pressure on the ECS system, and avoid the problem of high call volume to query-type OpenAPIs due to frequent polling, thus triggering rate limiting and providing users with a more efficient and convenient service experience. Thus, the goal of subscribing to asynchronous OpenAPI operation results through an event-driven approach with simple operations is achieved, enabling real-time perception of task operation results. This reduces the number of calls to query-type OpenAPIs, lowers the load on the ECS system, improves the processing efficiency of the ECS system, provides real-time perception of task operation results, and enhances the user experience.
[0157] The operation result processing method provided in this application embodiment can be applied, but is not limited to, to application scenarios involving resource manipulation through interfaces in fields such as e-commerce services, education services, legal services, medical services, conference services, social networking services, financial product services, logistics services, and navigation services. For example, resource manipulation through interfaces in e-commerce service scenarios, resource manipulation through interfaces in education service scenarios, resource manipulation through interfaces in legal service scenarios, etc., and there are no restrictions here.
[0158] In this embodiment, an operation result processing request is obtained through a first application programming interface (API). This request includes target configuration parameters, which are configuration parameters for subscribing to asynchronous open API operation results via an event-driven approach. These parameters are obtained based on target event service information and target message service information. The target event service information is used to determine the rules for subscribing to asynchronous open API operation results via an event-driven approach, and the target message service information is used to transmit the asynchronous open API operation results. Then, an operation result processing response is returned through a second API. This response includes the asynchronous open API operation results. This achieves the goal of subscribing to asynchronous OpenAPI operation results via an event-driven approach through simple operations, enabling real-time perception of task operation results. This reduces the number of calls to query-type OpenAPIs, lowers the load on the ECS system, improves the processing efficiency of the ECS system, provides real-time perception of task operation results, and enhances the user experience. Furthermore, it solves the technical problem in related technologies where obtaining operation results through event subscription leads to cumbersome operations and low processing efficiency.
[0159] It should be noted that the preferred implementation of this embodiment can be found in the relevant description in Embodiment 1, and will not be repeated here.
[0160] Example 4
[0161] In the operating environment as described in Example 1, this application provides as follows: Figure 7 This illustrates a method for processing operation results. Figure 7 This is a flowchart of an operation result processing method according to Embodiment 4 of this application, as follows: Figure 7 As shown, the method includes:
[0162] Step S71: Obtain the current input operation result processing dialog request. The operation result processing dialog request includes: target configuration parameters. The target configuration parameters are configuration parameters for subscribing to the operation results of the asynchronous open application interface through an event-driven approach. The target configuration parameters are obtained based on target event service information and target message service information. The target event service information is used to determine the rules for subscribing to the operation results of the asynchronous open application interface through an event-driven approach. The target message service information is used to transmit the operation results of the asynchronous open application interface.
[0163] Step S72: In response to the operation result processing dialog request, return the operation result processing dialog reply, wherein the operation result processing dialog reply includes: asynchronous open application interface operation result;
[0164] Step S73: Display the results of the asynchronous open application programming interface operation within the graphical user interface.
[0165] An operation result processing dialogue request can be understood as a dialogue request between a user and a smart machine device. An operation result processing dialogue response can be understood as the smart machine device's response to the user's operation result processing dialogue request.
[0166] The initialization configuration operation is used to initialize and configure the Software Development Kit (SDK) for the asynchronous Open Application Programming Interface (OpenAPI), that is, to initialize and configure the SDK for the asynchronous OpenAPI. By initializing and configuring the SDK, the SDK is equipped with the necessary authentication, networking, and behavioral capabilities when communicating with the asynchronous OpenAPI, enabling the SDK to better adapt to different use cases and have better stability, performance, and maintainability.
[0167] The target event service information can be understood as the EventBridge subscription rules, used to determine the rules for subscribing to the results of asynchronous OpenAPI operations in an event-driven manner. In this embodiment, to avoid the problems of polling leading to delayed results and high call volume of query-type OpenAPIs, an event-driven method is adopted to subscribe to the results of asynchronous OpenAPI operations in a timely manner. The target event service information can be understood as the rules defined by this method.
[0168] The target message service information can be understood as a message service (MNS) queue, which is used to transmit the results of asynchronous OpenAPI operations, that is, to transmit the execution status and results of asynchronous operations executed through asynchronous OpenAPI.
[0169] The target configuration parameters are those for subscribing to the results of asynchronous OpenAPI operations via an event-driven approach. Each asynchronous OpenAPI operation corresponds to an event, resulting in various event types. For example, calling an asynchronous OpenAPI instance for an additional network interface will generate a "Call for Additional Network Interface Complete" event upon completion of the entire operation. The target configuration parameters can be understood as the configuration parameters required to subscribe to these events; different events correspond to different configuration parameters.
[0170] For example, configuration parameters may include the MNS queue name, the MNS queue access address (endpoint), the user login account information, etc., which are not limited here.
[0171] In this embodiment, a dialog request is processed by obtaining the operation result of the current input. The operation result processing dialog request includes: target configuration parameters, which are configuration parameters for subscribing to the operation result of the asynchronous open application interface via an event-driven approach. The target configuration parameters are obtained based on target event service information and target message service information. The target event service information is used to determine the rules for subscribing to the operation result of the asynchronous open application interface via an event-driven approach, and the target message service information is used to transmit the operation result of the asynchronous open application interface. Then, in response to the operation result processing dialog request, an operation result processing dialog reply is returned, which includes the asynchronous open application interface operation result. Finally, after obtaining the asynchronous open application interface operation result, the asynchronous open application interface operation result is displayed in the graphical user interface to provide feedback to the user. As can be seen, this application integrates event-driven functionality into the SDK, allowing users to subscribe to asynchronous OpenAPI operation results in an event-driven manner. This enables users to easily utilize the event-driven service with simple configuration, enabling them to perceive task operation results in real time. This reduces the number of queries to the OpenAPI, lowers the load on the ECS system, and avoids rate limiting issues caused by frequent polling of the ECS system leading to a high volume of queries to the OpenAPI. Ultimately, this provides users with a more efficient and convenient service experience. Therefore, it achieves the goal of subscribing to asynchronous OpenAPI operation results through an event-driven approach with simple operations, thereby reducing the number of queries to the OpenAPI, lowering the load on the ECS system, improving ECS system processing efficiency, enabling real-time perception of task operation results, and enhancing the user experience.
[0172] The operation result processing method provided in this application embodiment can be applied, but is not limited to, to application scenarios involving resource manipulation through interfaces in fields such as e-commerce services, education services, legal services, medical services, conference services, social networking services, financial product services, logistics services, and navigation services. For example, resource manipulation through interfaces in e-commerce service scenarios, resource manipulation through interfaces in education service scenarios, resource manipulation through interfaces in legal service scenarios, etc., and there are no restrictions here.
[0173] This application's embodiment processes dialogue requests by obtaining the current input operation result. The operation result processing dialogue request includes: target configuration parameters, which are configuration parameters for subscribing to asynchronous OpenAPI operation results via an event-driven approach. These target configuration parameters are obtained based on target event service information and target message service information. The target event service information is used to determine the rules for subscribing to asynchronous OpenAPI operation results via an event-driven approach, and the target message service information is used to transmit the asynchronous OpenAPI operation results. Then, in response to the operation result processing dialogue request, an operation result processing dialogue reply is returned, which includes the asynchronous OpenAPI operation result. Finally, after obtaining the asynchronous OpenAPI operation result, it is displayed in the graphical user interface to provide feedback to the user. This achieves the goal of subscribing to asynchronous OpenAPI operation results via an event-driven approach through simple operations, enabling real-time perception of task operation results. This reduces the number of calls to query-type OpenAPIs, lowers ECS system pressure, improves ECS system processing efficiency, provides real-time perception of task operation results, and enhances user experience. Furthermore, it solves the technical problem in related technologies where obtaining operation results through event subscription leads to cumbersome operations and low processing efficiency.
[0174] It should be noted that the preferred implementation of this embodiment can be found in the relevant description in Embodiment 1, and will not be repeated here.
[0175] Example 5
[0176] According to an embodiment of this application, an apparatus embodiment for implementing the above-described operation result processing method is also provided. Figure 8 This is a schematic diagram of the structure of an operation result processing device according to Embodiment 5 of this application, as shown below. Figure 8 As shown, the device includes:
[0177] The first generation module 801 is used to generate target event service information and target message service information in response to the client's initialization configuration operation. The initialization configuration operation is used to initialize the software development kit of the asynchronous open application interface, the target event service information is used to determine the rules for subscribing to the operation results of the asynchronous open application interface in an event-driven manner, and the target message service information is used to transmit the operation results of the asynchronous open application interface.
[0178] The first acquisition module 802 is used to acquire target configuration parameters based on target event service information and target message service information, wherein the target configuration parameters are configuration parameters for subscribing to the operation results of asynchronous open application interface through event-driven method;
[0179] The first return module 803 is used to return the target configuration parameters to the client so that the client can subscribe to the results of asynchronous open application programming interface operations in an event-driven manner.
[0180] Optionally, it further includes: a first publishing module, used to identify the application interface to be published as an asynchronous open application interface, wherein the asynchronous open application interface is used to call cloud server resources to execute the target cloud service; select the target event corresponding to the asynchronous open application interface, wherein the target event is used to determine that the target cloud service has been completed; and publish the asynchronous open application interface and event-driven integration document, wherein the event-driven integration document is used to provide a document description of the operation results of subscribing to the asynchronous open application interface in an event-driven manner.
[0181] Optionally, the first acquisition module 701 is further configured to: determine the event processing method of the target event based on the target event service information, wherein the event processing method is used to determine the event mode and the event target; determine the content to be configured of the target message service information using the event processing method; and generate target configuration parameters using the content to be configured.
[0182] Optionally, the first acquisition module 701 is further configured to: acquire the event source, event type, service type, queue identifier, and message body type corresponding to the target event based on the target event service information; determine the event pattern using the event source and event type; and determine the event target using the service type, queue identifier, and message body type, wherein the event pattern is used to filter the target event, and the event target is used to determine the delivery object of the target event.
[0183] Optionally, it also includes: a second publishing module for generating a software development kit based on event-driven code, wherein the event-driven code is code that subscribes to the results of asynchronous open application programming interface operations in an event-driven manner; and publishing the software development kit.
[0184] Optionally, it also includes: a configuration module for receiving a code configuration request from a client, wherein the code configuration request includes: target configuration parameters; and configuring the target configuration parameters into the event-driven code of the software development kit.
[0185] Optionally, it also includes: an activation module, used to display the event-driven integration document to the client in response to the client's document viewing request; and to activate and authorize the event service and message service in response to the activation authorization message initiated by the client based on the event-driven integration document. The event service is used to subscribe to the target event through the client and deliver the target event to the message queue corresponding to the message service using the transmission protocol corresponding to the message service. The message service is used to subscribe to the target event through the client and deliver the target event to the client.
[0186] Optionally, the first generation module 801 is further configured to: generate target event service information by calling an event service through a software development kit, and generate target message service information by calling a message service.
[0187] Optionally, it also includes: a first maintenance module, used to query and maintain the target event subscription rules through the event service in response to a client's subscription rule query request.
[0188] Optionally, it also includes: a second maintenance module, used to query and maintain the target event message queue through the message service in response to a message queue query request from a client.
[0189] By adopting the embodiments of this application, after receiving the client's initialization configuration operation, i.e., after receiving the operation to initialize the SDK of the asynchronous OpenAPI, the initialization configuration is completed, and target event service information for determining the rules for subscribing to the results of asynchronous OpenAPI operations in an event-driven manner and target message service information for transmitting the results of asynchronous OpenAPI operations are generated. That is, EventBridge subscription rules and MNS queues are created. Then, based on the EventBridge subscription rules and MNS queues, the corresponding target configuration parameters for subscribing to the results of asynchronous OpenAPI operations in an event-driven manner are obtained. Finally, the target configuration parameters are returned to the client, enabling the client to subscribe to the results of asynchronous OpenAPI operations in an event-driven manner. This achieves the goal of subscribing to the results of asynchronous OpenAPI operations in an event-driven manner through simple operations and real-time perception of task operation results. This reduces the number of calls to query-type OpenAPIs, reduces the pressure on the ECS system, improves the processing efficiency of the ECS system, provides real-time perception of task operation results, and improves the user experience. In turn, it solves the technical problem in related technologies where obtaining operation results by subscribing to events leads to cumbersome operations and low processing efficiency.
[0190] It should be noted that the first generation module 801, the first acquisition module 802, and the first return module 803 mentioned above correspond to steps S21 to S23 in Embodiment 1. The three modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of a device and run in the computer terminal 10 provided in Embodiment 1.
[0191] According to an embodiment of this application, another apparatus embodiment for implementing the above-described operation result processing method is also provided. Figure 9 This is a schematic diagram of another operation result processing device according to Embodiment 5 of this application, as shown below. Figure 9 As shown, the device includes:
[0192] The second generation module 901 is used to perform initialization configuration operations on the server side, wherein the initialization configuration operations are used to initialize the software development kit for the asynchronous open application interface;
[0193] The second return module 902 is used to receive the target configuration parameters returned by the server. The target configuration parameters are obtained based on the target event service information and the target message service information. The target configuration parameters are the configuration parameters for subscribing to the results of the asynchronous open application interface operation in an event-driven manner. The target event service information is used to determine the rules for subscribing to the results of the asynchronous open application interface operation in an event-driven manner. The target message service information is used to transmit the results of the asynchronous open application interface operation.
[0194] Subscription module 903 is used to subscribe to the results of asynchronous open application programming interface operations in an event-driven manner based on target configuration parameters.
[0195] By employing the embodiments of this application, an initialization configuration operation is performed on the server side, namely, the initialization configuration of the asynchronous OpenAPI SDK, to generate target event service information and target message service information on the server side, that is, to create EventBridge subscription rules and MNS queues. Then, the target configuration parameters returned by the server are received based on the EventBridge subscription rules and MNS queues, wherein the target configuration parameters are obtained based on the target event service information and target message service information. Finally, based on the target configuration parameters, the results of asynchronous open application interface operations are subscribed to in an event-driven manner. This achieves the goal of subscribing to asynchronous OpenAPI operation results in an event-driven manner through simple operations, and realizing the real-time perception of task operation results. This achieves the technical effects of reducing the number of calls to query-type OpenAPIs, reducing the pressure on the ECS system, improving the processing efficiency of the ECS system, realizing the real-time perception of task operation results, and improving the user experience. In turn, it solves the technical problem in related technologies that obtaining operation results by subscribing to events leads to cumbersome operations and low processing efficiency.
[0196] It should be noted that the second generation module 901, the second return module 902, and the subscription module 903 mentioned above correspond to steps S51 to S53 in Embodiment 2. The three modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of a device and run in the computer terminal 10 provided in Embodiment 1.
[0197] According to an embodiment of this application, another embodiment of an apparatus for implementing the above-described operation result processing method is also provided. Figure 10 This is a schematic diagram of the structure of another operation result processing device according to Embodiment 5 of this application, as shown below. Figure 10 As shown, the device includes:
[0198] The second acquisition module 1001 is used to acquire an operation result processing request through the first application programming interface. The operation result processing request includes: target configuration parameters, which are configuration parameters for subscribing to the operation results of the asynchronous open application programming interface in an event-driven manner. The target configuration parameters are obtained based on target event service information and target message service information. The target event service information is used to determine the rules for subscribing to the operation results of the asynchronous open application programming interface in an event-driven manner, and the target message service information is used to transmit the operation results of the asynchronous open application programming interface.
[0199] The third return module 1002 is used to return an operation result processing response through the second application programming interface, wherein the operation result processing response includes: the operation result of the asynchronous open application programming interface.
[0200] In this embodiment, an operation result processing request is obtained through a first application programming interface (API). This request includes target configuration parameters, which are configuration parameters for subscribing to asynchronous open API operation results via an event-driven approach. These parameters are obtained based on target event service information and target message service information. The target event service information is used to determine the rules for subscribing to asynchronous open API operation results via an event-driven approach, and the target message service information is used to transmit the asynchronous open API operation results. Then, an operation result processing response is returned through a second API. This response includes the asynchronous open API operation results. This achieves the goal of subscribing to asynchronous OpenAPI operation results via an event-driven approach through simple operations, enabling real-time perception of task operation results. This reduces the number of calls to query-type OpenAPIs, lowers the load on the ECS system, improves the processing efficiency of the ECS system, provides real-time perception of task operation results, and enhances the user experience. Furthermore, it solves the technical problem in related technologies where obtaining operation results through event subscription leads to cumbersome operations and low processing efficiency.
[0201] It should be noted that the second acquisition module 1001 and the third return module 1002 mentioned above correspond to steps S61 and S62 in Embodiment 3. The two modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware components or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of the device and run in the computer terminal 10 provided in Embodiment 1.
[0202] According to an embodiment of this application, another embodiment of an apparatus for implementing the above-described operation result processing method is also provided. Figure 11 This is a schematic diagram of the structure of another operation result processing device according to Embodiment 5 of this application, as shown below. Figure 11 As shown, the device includes:
[0203] The third acquisition module 1101 is used to acquire the current input operation result processing dialog request. The operation result processing dialog request includes: target configuration parameters, which are configuration parameters for subscribing to the operation result of the asynchronous open application interface through an event-driven method. The target configuration parameters are obtained based on target event service information and target message service information. The target event service information is used to determine the rules for subscribing to the operation result of the asynchronous open application interface through an event-driven method, and the target message service information is used to transmit the operation result of the asynchronous open application interface.
[0204] The fourth return module 1102 is used to respond to the operation result processing dialog request and return the operation result processing dialog response, wherein the operation result processing dialog response includes: the operation result of the asynchronous open application programming interface;
[0205] Display module 1103 is used to display the results of asynchronous open application programming interface operations within a graphical user interface.
[0206] This application's embodiment processes dialogue requests by obtaining the current input operation result. The operation result processing dialogue request includes: target configuration parameters, which are configuration parameters for subscribing to asynchronous OpenAPI operation results via an event-driven approach. These target configuration parameters are obtained based on target event service information and target message service information. The target event service information is used to determine the rules for subscribing to asynchronous OpenAPI operation results via an event-driven approach, and the target message service information is used to transmit the asynchronous OpenAPI operation results. Then, in response to the operation result processing dialogue request, an operation result processing dialogue reply is returned, which includes the asynchronous OpenAPI operation result. Finally, after obtaining the asynchronous OpenAPI operation result, it is displayed in the graphical user interface to provide feedback to the user. This achieves the goal of subscribing to asynchronous OpenAPI operation results via an event-driven approach through simple operations, enabling real-time perception of task operation results. This reduces the number of calls to query-type OpenAPIs, lowers ECS system pressure, improves ECS system processing efficiency, provides real-time perception of task operation results, and enhances user experience. Furthermore, it solves the technical problem in related technologies where obtaining operation results through event subscription leads to cumbersome operations and low processing efficiency.
[0207] It should be noted that the third acquisition module 1101, the fourth return module 1102, and the display module 1103 mentioned above correspond to steps S71 to S73 in Embodiment 4. The three modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of the device and run in the computer terminal 10 provided in Embodiment 1.
[0208] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0209] Example 6
[0210] Embodiments of this application may provide a computer terminal (i.e., an electronic device), which may be any one of a group of computer terminals. Optionally, in this embodiment, the aforementioned computer terminal may also be replaced by a mobile terminal or other terminal device.
[0211] Optionally, in this embodiment, the computer terminal may be located in at least one of a plurality of network devices in a computer network.
[0212] In this embodiment, the computer terminal described above can execute the program code for the following steps in the operation result processing method: In response to the client's initialization configuration operation, generating target event service information and target message service information, wherein the initialization configuration operation is used to initialize the software development kit (SDK) of the asynchronous open application programming interface (API), the target event service information is used to determine the rules for subscribing to the operation results of the asynchronous API in an event-driven manner, and the target message service information is used to transmit the operation results of the asynchronous API; obtaining target configuration parameters based on the target event service information and target message service information, wherein the target configuration parameters are configuration parameters for subscribing to the operation results of the asynchronous API in an event-driven manner; and returning the target configuration parameters to the client so that the client can subscribe to the operation results of the asynchronous API in an event-driven manner.
[0213] Optionally, Figure 12 This is a structural block diagram of a computer terminal according to an embodiment of this application. Figure 12 As shown, the computer terminal A may include: one or more (only one is shown in the figure) processors 1202, memory 1204, memory controller, and peripheral interfaces, wherein the peripheral interfaces are connected to a radio frequency module, an audio module, and a display.
[0214] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the operation result processing method and apparatus in this application embodiment. The processor executes various functional applications and data processing by running the stored software programs and modules, thereby realizing the above-mentioned operation result processing method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to computer terminal A via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0215] The processor can invoke information and applications stored in memory via a transmission device to perform the following steps: In response to an initialization configuration operation by the client, generate target event service information and target message service information, wherein the initialization configuration operation is used to initialize the software development kit (SDK) of the asynchronous open application programming interface (API), the target event service information is used to determine the rules for subscribing to the results of the asynchronous API operation in an event-driven manner, and the target message service information is used to transmit the results of the asynchronous API operation; obtain target configuration parameters based on the target event service information and target message service information, wherein the target configuration parameters are the configuration parameters for subscribing to the results of the asynchronous API operation in an event-driven manner; and return the target configuration parameters to the client so that the client can subscribe to the results of the asynchronous API operation in an event-driven manner.
[0216] Optionally, the processor may also execute program code that performs the following steps: identifying the application programming interface (API) to be published as an asynchronous open API, wherein the asynchronous open API is used to call cloud server resources to execute the target cloud service; selecting the target event corresponding to the asynchronous open API, wherein the target event is used to determine that the target cloud service has been completed; and publishing the asynchronous open API and event-driven integration documentation, wherein the event-driven integration documentation is used to provide a document description of the operation results of subscribing to the asynchronous open API in an event-driven manner.
[0217] Optionally, the processor may also execute program code that performs the following steps: determining the event handling method of the target event based on the target event service information, wherein the event handling method is used to determine the event mode and the event target; determining the content to be configured in the target message service information using the event handling method; and generating target configuration parameters using the content to be configured.
[0218] Optionally, the processor may also execute program code that performs the following steps: obtaining the event source, event type, service type, queue identifier, and message body type corresponding to the target event based on the target event service information; determining the event pattern using the event source and event type; and determining the event target using the service type, queue identifier, and message body type, wherein the event pattern is used to filter the target event, and the event target is used to determine the delivery object of the target event.
[0219] Optionally, the processor may also execute program code that performs the following steps: generating a software development kit based on event-driven code, wherein the event-driven code is code that subscribes to the results of asynchronous open application programming interface operations in an event-driven manner; and publishing the software development kit.
[0220] Optionally, the processor may also execute program code that performs the following steps: receiving a code configuration request from a client, wherein the code configuration request includes: target configuration parameters; configuring the target configuration parameters into the event-driven code of the software development kit.
[0221] Optionally, the processor may also execute program code that performs the following steps: in response to a client’s document viewing request, displaying an event-driven integration document to the client; in response to an authorization message initiated by the client based on the event-driven integration document, enabling and authorizing an event service and a message service, wherein the event service is used to subscribe to a target event through the client and deliver the target event to the message queue corresponding to the message service using the transmission protocol corresponding to the message service, and the message service is used to subscribe to a target event through the client and deliver the target event to the client.
[0222] Optionally, the processor may also execute program code that performs the following steps: using a software development kit to call an event service to generate target event service information, and calling a message service to generate target message service information.
[0223] Optionally, the processor may also execute program code that performs the following steps: in response to a client’s subscription rule lookup request, looks up and maintains the target event subscription rule through the event service.
[0224] Optionally, the processor may also execute program code that performs the following steps: in response to a client’s message queue lookup request, looks up and maintains the target event message queue through the message service.
[0225] By adopting the embodiments of this application, after receiving the client's initialization configuration operation, i.e., after receiving the operation to initialize the SDK of the asynchronous OpenAPI, the initialization configuration is completed, and target event service information for determining the rules for subscribing to the results of asynchronous OpenAPI operations in an event-driven manner and target message service information for transmitting the results of asynchronous OpenAPI operations are generated. That is, EventBridge subscription rules and MNS queues are created. Then, based on the EventBridge subscription rules and MNS queues, the corresponding target configuration parameters for subscribing to the results of asynchronous OpenAPI operations in an event-driven manner are obtained. Finally, the target configuration parameters are returned to the client, enabling the client to subscribe to the results of asynchronous OpenAPI operations in an event-driven manner. This achieves the goal of subscribing to the results of asynchronous OpenAPI operations in an event-driven manner through simple operations and real-time perception of task operation results. This reduces the number of calls to query-type OpenAPIs, reduces the pressure on the ECS system, improves the processing efficiency of the ECS system, provides real-time perception of task operation results, and improves the user experience. In turn, it solves the technical problem in related technologies where obtaining operation results by subscribing to events leads to cumbersome operations and low processing efficiency.
[0226] Those skilled in the art will understand that Figure 12 The structure shown is for illustrative purposes only. Computer terminal A can also be a smartphone (such as an Android phone, iOS phone, etc.), tablet computer, PDA, mobile Internet Device (MID), PAD, and other terminal devices. Figure 12 This does not limit the structure of the aforementioned electronic device. For example, computer terminal A may also include components that are more... Figure 12 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 12 The different configurations shown.
[0227] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0228] Example 7
[0229] Embodiments of this application also provide a computer-readable storage medium. Optionally, in this embodiment, the aforementioned computer-readable storage medium can be used to store the program code executed by the operation result processing method provided in Embodiment 1.
[0230] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0231] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: in response to an initialization configuration operation by the client, generating target event service information and target message service information, wherein the initialization configuration operation is used to initialize the software development kit of the asynchronous open application interface, the target event service information is used to determine the rules for subscribing to the results of the asynchronous open application interface operation in an event-driven manner, and the target message service information is used to transmit the results of the asynchronous open application interface operation; obtaining target configuration parameters based on the target event service information and target message service information, wherein the target configuration parameters are configuration parameters for subscribing to the results of the asynchronous open application interface operation in an event-driven manner; and returning the target configuration parameters to the client so that the client can subscribe to the results of the asynchronous open application interface operation in an event-driven manner.
[0232] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: identifying the application programming interface to be published as an asynchronous open application programming interface, wherein the asynchronous open application programming interface is used to call cloud server resources to execute a target cloud service; selecting a target event corresponding to the asynchronous open application programming interface, wherein the target event is used to determine that the target cloud service has been completed; and publishing the asynchronous open application programming interface and event-driven integration document, wherein the event-driven integration document is used to provide a document description of the operation results of subscribing to the asynchronous open application programming interface in an event-driven manner.
[0233] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining the event handling method of the target event based on the target event service information, wherein the event handling method is used to determine the event mode and the event target; determining the content to be configured of the target message service information using the event handling method; and generating target configuration parameters using the content to be configured.
[0234] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining the event source, event type, service type, queue identifier, and message body type corresponding to the target event based on the target event service information; determining the event pattern using the event source and event type; and determining the event target using the service type, queue identifier, and message body type, wherein the event pattern is used to filter the target event, and the event target is used to determine the delivery object of the target event.
[0235] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: generating a software development kit based on event-driven code, wherein the event-driven code is code that subscribes to the results of asynchronous open application programming interface operations in an event-driven manner; and publishing the software development kit.
[0236] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: receiving a code configuration request from a client, wherein the code configuration request includes: target configuration parameters; configuring the target configuration parameters into the event-driven code of the software development kit.
[0237] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: in response to a client's document viewing request, displaying an event-driven integrated document to the client; in response to an authorization message initiated by the client based on the event-driven integrated document, activating and authorizing an event service and a message service, wherein the event service is used to subscribe to a target event through the client and deliver the target event to the message queue corresponding to the message service using the transmission protocol corresponding to the message service, and the message service is used to subscribe to a target event through the client and deliver the target event to the client.
[0238] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: using a software development kit to call an event service to generate target event service information, and calling a message service to generate target message service information.
[0239] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: in response to a client's subscription rule lookup request, the target event subscription rule is looked up and maintained through the event service.
[0240] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: in response to a message queue lookup request from a client, looking up and maintaining the target event message queue through a message service.
[0241] Embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the operation result processing method in any of the above embodiments.
[0242] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0243] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0244] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0245] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0246] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0247] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0248] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method of operating a result processing, characterized by, include: In response to the client's initialization configuration operation, target event service information and target message service information are generated. The initialization configuration operation is used to initialize the software development kit of the asynchronous open application interface. The target event service information is used to determine the rules for subscribing to the operation results of the asynchronous open application interface in an event-driven manner. The target message service information is used to transmit the operation results of the asynchronous open application interface. Target configuration parameters are obtained based on the target event service information and the target message service information, wherein the target configuration parameters are configuration parameters for subscribing to the operation results of the asynchronous open application interface through the event-driven method; The target configuration parameters are returned to the client so that the client can subscribe to the results of the asynchronous open application programming interface operation via the event-driven approach.
2. The operation result processing method according to claim 1, characterized by, The method for processing the operation results also includes: The application programming interface to be published is identified as the asynchronous open application programming interface, wherein the asynchronous open application programming interface is used to call cloud server resources to execute the target cloud service; Select the target event corresponding to the asynchronous open application programming interface, wherein the target event is used to determine that the target cloud service has been completed; The asynchronous open application programming interface (API) and event-driven integration documentation are published, wherein the event-driven integration documentation is used to provide a documented description of the operation results of subscribing to the asynchronous open application programming interface through the event-driven approach.
3. The operation result processing method according to claim 2, characterized by, The step of obtaining the target configuration parameters based on the target event service information and the target message service information includes: The event handling method for the target event is determined based on the target event service information, wherein the event handling method is used to determine the event mode and the event target; The event handling method is used to determine the configuration content of the target message service information; The target configuration parameters are generated from the content to be configured.
4. The operation result processing method according to claim 3, characterized in that, The step of determining the event handling method for the target event based on the target event service information includes: Based on the target event service information, obtain the event source, event type, service type, queue identifier, and message body type corresponding to the target event; The event pattern is determined using the event source and the event type, and the event target is determined using the service type, the queue identifier, and the message body type, wherein the event pattern is used to filter the target event, and the event target is used to determine the delivery object of the target event.
5. The method for processing operation results according to claim 1, characterized in that, The method for processing the operation results also includes: The software development kit is generated based on event-driven code, wherein the event-driven code is code that subscribes to the results of the asynchronous open application programming interface operation through the event-driven approach; Release the aforementioned software development kit.
6. The operation result processing method according to claim 5, characterized in that, The method for processing the operation results also includes: Receive a code configuration request from the client, wherein the code configuration request includes: the target configuration parameters; Configure the target configuration parameters into the event-driven code of the software development kit.
7. The method for processing operation results according to claim 2, characterized in that, The method for processing the operation results also includes: In response to the client's document viewing request, the event-driven integration document is displayed to the client; In response to the authorization message initiated by the client based on the event-driven integration document, the event service and message service are authorized. The event service is used to subscribe to the target event through the client and deliver the target event to the message queue corresponding to the message service using the transmission protocol corresponding to the message service. The message service is used to subscribe to the target event through the client and deliver the target event to the client.
8. The method for processing operation results according to claim 7, characterized in that, The generation of target event service information and target message service information includes: The software development kit is used to call the event service to generate the target event service information, and the message service to generate the target message service information.
9. The method for processing operation results according to claim 7, characterized in that, The method for processing the operation results also includes: In response to the client's request to view subscription rules, the target event subscription rules are viewed and maintained through the event service.
10. The method for processing operation results according to claim 7, characterized in that, The method for processing the operation results also includes: In response to the client's message queue lookup request, the target event message queue is looked up and maintained through the message service.
11. A method for processing operation results, characterized in that, include: An initialization configuration operation is performed on the server side, wherein the initialization configuration operation is used to initialize the software development kit for the asynchronously exposed application programming interface; The system receives target configuration parameters returned by the server, wherein the target configuration parameters are obtained based on target event service information and target message service information. The target configuration parameters are configuration parameters for subscribing to the operation results of the asynchronous open application interface in an event-driven manner. The target event service information is used to determine the rules for subscribing to the operation results of the asynchronous open application interface in an event-driven manner. The target message service information is used to transmit the operation results of the asynchronous open application interface. Based on the target configuration parameters, the results of the asynchronous open application programming interface operation are subscribed to using the event-driven approach.
12. A method for processing operation results, characterized in that, include: The operation result processing request is obtained through the first application programming interface, wherein the operation result processing request includes: target configuration parameters, the target configuration parameters are configuration parameters for subscribing to the operation results of the asynchronous open application programming interface in an event-driven manner, the target configuration parameters are obtained based on target event service information and target message service information, the target event service information is used to determine the rules for subscribing to the operation results of the asynchronous open application programming interface in an event-driven manner, and the target message service information is used to transmit the operation results of the asynchronous open application programming interface; The operation result processing response is returned through the second application programming interface, wherein the operation result processing response includes the operation result of the asynchronous open application programming interface.
13. A method for processing operation results, characterized in that, include: The dialog request for processing the operation result of the current input is obtained. The operation result processing dialog request includes: target configuration parameters, which are configuration parameters for subscribing to the operation result of the asynchronous open application interface in an event-driven manner. The target configuration parameters are obtained based on target event service information and target message service information. The target event service information is used to determine the rules for subscribing to the operation result of the asynchronous open application interface in an event-driven manner, and the target message service information is used to transmit the operation result of the asynchronous open application interface. In response to the operation result processing dialog request, an operation result processing dialog reply is returned, wherein the operation result processing dialog reply includes: the operation result of the asynchronous open application interface; The results of the asynchronous open application programming interface operation are displayed within the graphical user interface.
14. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, executes the operation result processing method according to any one of claims 1 to 13.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the operation result processing method according to any one of claims 1 to 13.
16. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the operation result processing method according to any one of claims 1 to 13.