A service calling method, device and medium for a business object
By receiving and processing service call requests from business objects, selecting target access service nodes based on business attributes, and generating service function status information, the problem of poor adaptability and low efficiency in existing technologies is solved, and efficient control and resource optimization for different types of business objects are achieved.
Patent Information
- Application Number
- CN202010414446.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-15
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2040-05-15
AI Technical Summary
Existing technologies have poor adaptability and low control efficiency when controlling service functions, making it difficult to meet the needs of different types of business objects.
A service invocation method for a business object is provided. By receiving the service invocation request of the target business object, determining the target access service node according to the business attributes, and generating service function status information based on policy configuration information and association information, it can adapt to different types of business objects and improve control adaptability and efficiency.
It improves the adaptability and efficiency of service function control for different types of business objects, optimizes resource utilization, and supports service calls in high-concurrency and security environments.
Smart Images

Figure CN111611091B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet communication technology, and in particular to a service calling method, device and medium for a business object. Background Art
[0002] An SDK (Software Development Kit) is a collection of tools that assists in the development of a specific software type. It can include documentation, examples, and tools. The specific software type used for development can be application software. For example, if you are developing a group-buying app that includes map navigation services, you can utilize an SDK for developing map navigation services. This SDK provides the API (Application Programming Interface) files used for developing these services.
[0003] As the concepts of continuous integration and continuous delivery become increasingly common, effective control of software functionality throughout the development-testing-release process is required to shorten the code integration cycle. Related technologies can configure relevant functionality in static configuration files or define it in a database. However, these approaches are limited to server-side products and suffer from poor adaptability and low control efficiency. Therefore, a more effective control solution for service functionality is needed. Summary of the Invention
[0004] In order to solve the problems of poor adaptability and low control efficiency in the control of service functions in existing technologies, the present invention provides a service calling method, device and medium for a business object:
[0005] In one aspect, the present invention provides a method for invoking a service of a business object, the method comprising:
[0006] Receive a service call request sent by a target business object, wherein the service call request carries business attributes and associated information of the target business object;
[0007] Determining a target access service node corresponding to the target service object according to the service attribute;
[0008] When the target service object corresponds to a client-type service object, generating service function status information based on the policy configuration information and the association information using the target access service node, and sending the service function status information to the target service object;
[0009] When the target service object corresponds to a service-side service object, the target access service node is used to send policy configuration information to the target service object, so that the target service object generates service function status information according to the policy configuration information and the association information.
[0010] On the other hand, a service invocation device for a business object is provided, the device comprising:
[0011] Service call request receiving module: used to receive the service call request sent by the target business object, the service call request carries the business attributes of the target business object and the association information of the current operation object;
[0012] A service call request sending module is used to determine the target access service node corresponding to the target service object according to the service attribute;
[0013] A first policy module is configured to, when the target service object corresponds to a client-type service object, generate service function status information based on the policy configuration information and the association information using the target access service node, and send the service function status information to the target service object;
[0014] The second policy module is used to send policy configuration information to the target business object using the target access service node when the target business object corresponds to a server-type business object, so that the target business object generates service function status information according to the policy configuration information and the associated information.
[0015] On the other hand, an electronic device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the service calling method of the business object as described above.
[0016] On the other hand, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored. The at least one instruction or the at least one program is loaded and executed by a processor to implement the service calling method of the business object as described above.
[0017] The present invention provides a method, device, and medium for calling a service of a business object, which have the following technical effects:
[0018] When controlling service functions, the present invention implements different logic settings for distributing service function status information based on the different types of target business objects (client or server). Furthermore, the selection of target access service nodes is combined with the business attributes of the target business objects for more fine-grained settings. This invention can improve the adaptability and efficiency of controlling service functions for different types of business objects and optimize the resource utilization of target business objects in obtaining service function status information. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 is a schematic diagram of an application environment provided by an embodiment of the present invention;
[0021] Figure 2 This is a flow chart of a service calling method for a business object provided by an embodiment of the present invention;
[0022] Figure 3 This is a flow chart of determining a target access service node corresponding to a target service object according to the service attributes provided by an embodiment of the present invention;
[0023] Figure 4 This is a flow chart of using a function management service node to update historical policy configuration information and generate corresponding update messages, as provided in an embodiment of the present invention;
[0024] Figure 5 This is a flow chart of real-time, offline processing of relevant data provided by an embodiment of the present invention;
[0025] Figure 6 This is a schematic diagram of an architecture corresponding to a service calling method of a business object provided by an embodiment of the present invention;
[0026] Figure 7 This is a schematic diagram of setting an access service node for an application aggregation mechanism provided by an embodiment of the present invention;
[0027] Figure 8 This is a block diagram of a service invocation device for a business object provided by an embodiment of the present invention;
[0028] Figure 9 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or devices.
[0031] See also Figure 1 , Figure 1 is a schematic diagram of an application environment provided by an embodiment of the present invention, such as Figure 1 As shown in the application environment. It should be noted that Figure 1 Just an example.
[0032] See also Figure 1 , Figure 1 This is a schematic diagram of an application environment provided by an embodiment of the present invention, which may include a client 01 and a server 02, wherein the client and the server are connected via a network. The user sends a service call request to the server via the client, and the server returns the corresponding service function status information to the client based on the service call request, and then the client makes a service call based on the service function status information. It should be noted that Figure 1 Just an example.
[0033] Specifically, client 01 may include physical devices such as smartphones, desktop computers, tablet computers, laptops, augmented reality (AR) / virtual reality (VR) devices, digital assistants, and smart wearable devices. It may also include software running on physical devices, such as computer programs. Operating systems running on client 01 may include, but are not limited to, Android, iOS (a mobile operating system developed by Apple), Linux, and Microsoft Windows.
[0034] Specifically, the server 02 may include an independent server, a distributed server, or a server cluster consisting of multiple servers. The server 02 may include a network communication unit, a processor, a memory, etc. The server 02 may provide background services for the client.
[0035] The following describes a specific embodiment of a service calling method of a business object of the present invention. Figure 2 It is a flowchart of a service calling method of a business object provided by an embodiment of the present invention. This specification provides the method operation steps as described in the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or server product is executed, it can be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment) according to the method shown in the embodiment or the accompanying drawings. Specifically, Figure 2 As shown, the method may include:
[0036] S201: Receive a service call request sent by a target business object, where the service call request carries business attributes and associated information of the target business object;
[0037] In an embodiment of the present invention, the target business object may correspond to at least one target instruction or at least one target program, or may correspond to a main program including the at least one target instruction or at least one target program, etc. The at least one instruction or at least one program may be constructed based on a software development kit (SDK). Accordingly, the server that receives the service call request sent by the target business object is the provider of the software development kit. The server provides a download path for the software development kit and provides management of related service functions of the software development kit.
[0038] When constructing the target business object, the corresponding interface of the software development kit can be called to add a certain service function to the relevant business scenario. Furthermore, the software development kit provided by the server can point to different language types, such as Go (a statically strongly typed, compiled language), Java (an object-oriented programming language), and Python (a cross-platform computer programming language); it can also point to different operating system types, such as Android and iOS. The software development kit provided by the server supports independent access to multiple terminal products classified in different dimensions such as terminals, front-ends, and back-ends.
[0039] When a service function is needed, the target business object can send a service call request to the corresponding server. The service call request carries the business attributes and associated information of the target business object. The business attributes can correspond to the type of target object (such as for individual users, for corporate users), the type of service provided (such as audio and video service type, map navigation service type, big data service type, etc.), and the traffic consumption of the corresponding product. The associated information can refer to the context information for running the target business object, such as device ID (deviceId), user ID (userId), operating system information, and the product ID and product version information corresponding to the target business object.
[0040] The server can determine the status of service features based on feature toggles. Accordingly, the server can encapsulate the logic for acquiring, using, and reporting these toggles within the provided SDK, thereby reducing code integration costs. Feature toggles can include feature / function toggles, release toggles, operation toggles, permission toggles, and experiment toggles, among others. Feature toggles effectively enable the on / off control of service features, effectively isolating code integration from service feature rollout. Even unfinished service features can be integrated into the mainline or even released to the service sooner, improving release efficiency. Feature toggles also support efficient and organized control of the visibility of new service features based on various policies (such as version-based, targeted, or conditional releases), without requiring code modifications and reducing code intrusion. This facilitates better integration with A / B testing (split testing), enhancing the maintainability of A / B testing. When a bug (vulnerability) occurs in the release of a service function, you can also use the feature switch to close it in real time to control risks in a timely manner.
[0041] It should be noted that the server serving as the provider of the software development kit in the embodiment of the present invention may include the (target) access service node and the function management service node described later.
[0042] S202: Determine a target access service node corresponding to the target service object according to the service attribute;
[0043] In an embodiment of the present invention, the server determines the target access service node corresponding to the target service object according to the service attributes. The target access service node can return service function status information or policy configuration information for the target service object in subsequent steps.
[0044] The server can include multiple access service nodes (access servers), which provide services for corresponding business objects. Accordingly, before determining the target access service node corresponding to the target business object based on the business attributes, a target program can be obtained; corresponding business attributes can be configured for multiple business objects; a set can be created for business objects corresponding to the same business attributes based on the target program, and an access service node can be configured for the set. A set mechanism is introduced to assign a corresponding set to each business object based on the business attributes. At least one business object can correspond to the same set, and one set corresponds to one access service node. Different access service nodes are deployed separately, allowing for dynamic expansion of business objects and access service nodes corresponding to the same set. Different sets are independent and non-interfering, ensuring better execution of related service call steps within the set, achieving traffic isolation, and providing a more secure and stable environment for supporting highly concurrent service call requests. Determining the target access service node based on business attributes can improve the accuracy and efficiency of determining the access service node that can provide the required service functions for the target business object. In actual applications, the access service nodes corresponding to the same set can be distributed. For example, the access service nodes corresponding to set 2 can be deployed in both A and B (see Figure 7 ). Accordingly, when the gateway needs to call the access service node corresponding to set 2 based on the service call request, it can call the access service node corresponding to set 2 based on the geographic location information corresponding to the target business object. This can achieve overload protection and load balancing at the gateway level.
[0045] Specifically, when there are multiple access service nodes, before determining the target access service node corresponding to the target service object based on the service attributes, a corresponding location identifier can be configured for each access service node. This location identifier can be a domain name, an Internet Protocol address, or the like. Accordingly, the target location identifier of the target access service node is obtained, and a delivery path for the service invocation request is determined based on the target location identifier. The delivery destination of this delivery path is the target access service node, and the delivery object is the service invocation request.
[0046] In a specific embodiment, Figure 3 As shown, when the service call request carries a historical location identifier indicating a historical access service node, determining the target access service node corresponding to the target service object according to the service attribute includes:
[0047] S301: Determine a first delivery path for the service call request based on the historical location identifier;
[0048] S302: Using the historical access service node to perform data query on the business object identifier of the target business object;
[0049] S303: When the historical access service node fails to find data associated with the service object identifier, determining the target access service node according to the service attribute;
[0050] When the target business object first sends a service call request for service function A to the server, the server determines the target access service node corresponding to the target business object based on the target business object's business attributes, obtains the location identifier of the target access service node, and then transmits the service call request for service function A based on the location identifier. If the response result for the service call request for service function A is successful, the target business object can store the location identifier.
[0051] When the target business object sends a service call request for service function A to the server for the first time, the service call request for service function A can carry the aforementioned location identifier (as a historical location identifier) in conjunction with the above. This allows the server to more quickly transmit the request. Since business objects are adjusted between sets during set management, for example, when a business object is adjusted from set 1 to set 3, the access service node corresponding to the business object also migrates, and the business object is no longer under the responsibility of the original access service node. First, a data query is performed on the business object identifier of the target business object using the historical access service node indicated by the first transmission path (corresponding to the historical location identifier). If no migration has occurred, the historical access service node remains the target access service node. If migration has occurred, the historical access service node is no longer the target access service node. Then, if migration has occurred, the target access service node is determined based on the business attributes. Accordingly, after determining the target access service node corresponding to the target business object based on the business attributes, the current location identifier of the target access service node can be queried using a location identifier database, and a second transmission path for the service call request can be determined based on the current location identifier.
[0052] Of course, the server may include a database for storing collection management data, so that in the event of migration as described above, the historical access service node may directly send a query request for the target access service node to the database, and the historical access service node may forward the service call request based on the query result returned by the database so that the target access service node can continue to process it.
[0053] In another specific embodiment, after determining the target access service node corresponding to the target service object according to the service attribute, the method further includes:
[0054] 1) Utilizing the target access service node to obtain current policy configuration information: the target access service node obtains the current policy configuration information from the function management service node based on a distributed coordination service.
[0055] The function management service node serves as the policy configuration manager for service functions on the server side. It is responsible for updating and storing policy configuration information. It can manage the policy configuration of multiple service functions simultaneously, and can manage the policy configuration of each service function in various dimensions. During initialization, the access service node can pull all the corresponding policy configuration information from the function management service node. Based on distributed coordination services, such as Zookeeper, the access service node can obtain the current policy configuration information in real time when it listens to update messages. The application of Zookeeper can ensure the timely synchronization of data in the target access service node without adding excessive construction and maintenance costs to the server side. The access service node can store the policy configuration information in memory, and then read it directly from the memory when it needs to be sent to the target business object, thereby improving the processing speed of service call requests.
[0056] Specifically, the function management service node is used to update the historical policy configuration information and generate a corresponding update message; the function management service node is used to push the update message to the distributed coordination service system; and when the target access service node monitors that the distributed coordination service system has received the update message, the target access service node is used to obtain the update message from the distributed coordination service system and use the update message as the current policy configuration information. The update message here carries the specific content of the updated policy configuration information.
[0057] Further, such as Figure 4 As shown, the function management service node includes a management client and a management server, and using the function management service node to update the historical policy configuration information and generate a corresponding update message includes:
[0058] S401: When receiving an update request sent by the management client, configure identity information for the management client based on the update request;
[0059] S402: Sending a pass credential matching the identity information to the management client, so that the management client sends the pass credential to the management server;
[0060] S403: Receive an identity authentication request sent by the management server, where the identity authentication request carries the access credential;
[0061] S404: Returning the identity authentication result to the management server based on the pass credential;
[0062] S405: When the identity authentication result is successful, the management server is used to update the historical policy configuration information and generate a corresponding update message: the management server determines the update authority of the identity corresponding to the pass credential, updates the historical policy configuration information based on the update authority and the update request, and generates the update message.
[0063] Staff (such as developers, product personnel, operations personnel, etc.) can update the policy configuration information stored in the management server (ToggleService) based on the management client (ToggleWeb). In this way, the management function management service node can achieve front-end and back-end separation of policy configuration management of service functions. When the staff triggers the management client to send an update request, an authentication mechanism is introduced to ensure the security of the policy configuration information. Figure 6 As shown, the OA (Office Automation) system in the server can be responsible for the above-mentioned identity authentication. The OA system configures identity information for the management client based on the update request, and sends the pass credential (corresponding identity information) to the management client. The management client sends the pass credential to the management server. The management server sends an identity authentication request carrying the pass credential to the OA system. The OA system returns to the management server whether the identity corresponding to the pass credential is currently valid, and the OA system maintains the validity of the issued identity.
[0064] When the identity authentication result is successful, the management server determines the update permissions for the identity corresponding to the pass credential, updates the historical policy configuration information based on the update permissions and the update request, and generates an update message. The management server maintains a database of valid identities and update permissions, allowing the management server to determine the update permissions for the identity corresponding to the pass credential based on this database.
[0065] Based on the above-mentioned authentication and permission control settings, the server can effectively record the operation of updating the policy configuration information of the service function, which can facilitate subsequent analysis.
[0066] Furthermore, the user interface provided by the management client (ToggleWeb) can show staff the number of service functions managed by feature switches in a certain product, as well as the operating system adaptation status, policy configuration status, actual usage status, and update status of each service function. For policy configuration, the user interface supports multi-version management and targeted version control (such as version range control and precise control of specific versions). Of course, the user interface supports the simultaneous display of multiple products. Staff can perform multi-level permission control on product-service functions based on the user interface.
[0067] 2) Using the target access service node to adjust local policy configuration information: the target access service node adjusts the local policy configuration information based on the current policy configuration information.
[0068] With the assistance of the distributed coordination service, the consistency of the local policy configuration information maintained by the access service node and the corresponding policy configuration information in the function management service node can be guaranteed, and the access service node can adjust the local policy configuration information in real time. Of course, to avoid the failure of the distributed coordination service, such as it not receiving update messages, the access service node can be configured to periodically pull the corresponding policy configuration information from the function management service node.
[0069] S203: When the target service object corresponds to a client-type service object, generating service function status information based on the policy configuration information and the association information using the target access service node, and sending the service function status information to the target service object;
[0070] In embodiments of the present invention, client-class business objects may correspond to programs running on physical devices that receive services (other than those provided by the aforementioned server). Physical devices here may include smartphones, desktop computers, tablet computers, laptops, augmented reality / virtual reality devices, digital assistants, smart wearable devices, and the like. Accordingly, client-class business objects may be built based on client-class SDKs provided by the server. In practical applications, client-class business objects may be mobile apps (Applications).
[0071] Considering that the context information of client-class business objects is relatively fixed within a certain period of time, and this context information is required when determining the service function status information, the server can store policy configuration information. If the same client-class business object sends multiple service call requests to the server, the server can return the corresponding service function status information calculated previously based on a preset time period. In this way, the client-class business object does not need to use the same context information multiple times for calculations based on the obtained policy configuration information, reducing the corresponding computing pressure of the client-class business object and the traffic consumption for data transmission. When the policy configuration is upgraded, there is no need to adjust the corresponding stored policy configuration information of the client-class business object, and the latest version of the policy configuration can be used timely and conveniently based on the server.
[0072] In a specific embodiment, the purpose of the client-class business object sending a service call request can be to pull and obtain service function status information (for example, whether the feature switch pointed to by the service function is specifically "on" or "off"), or to obtain policy configuration information and then trigger the generation of service function status information. When corresponding to the former, you can refer to the relevant records issued directly by the server to the client-class business object above, and will not repeat them here. When corresponding to the latter, the client-class business object obtains policy configuration information based on the service call request. The client-class business object can call the isEnable("feature_name", default_value) interface (a trigger-type interface) provided by the SDK, and assign values to the parameters involved in the interface based on the policy configuration information and context information to obtain the service function status information. The client-class business object can read the service function status information indicating the switch result from the local memory, record the switch trigger event, and report the switch trigger event to the statistics server in batches at a regular interval. The statistics server belongs to the server. In actual applications, the target business object can store and back up the obtained service function status information locally.
[0073] S204: When the target service object corresponds to a service-side service object, the target access service node is used to send policy configuration information to the target service object, so that the target service object generates service function status information according to the policy configuration information and the association information.
[0074] In embodiments of the present invention, a server-side business object may correspond to a program running on a physical device that provides a service (other than the aforementioned service provided by the server), where the physical device may be a server. Accordingly, the server-side business object may be constructed based on a server-side SDK provided by the server. In practical applications, the server-side business object may be a program deployed on the server.
[0075] Considering that the context information of server-side business objects can change over time, server-side business objects can obtain policy configuration information from the server. The server-side business objects can then perform real-time calculations based on different context information to obtain corresponding service function status information, thereby improving adaptability to different context information. Specifically, the purpose of a server-side business object sending a service call request can be to obtain policy configuration information and then trigger the generation of service function status information. The server-side business object can call the isEnable("feature_name", default_value) interface (a triggering interface) provided by the SDK and assign values to the parameters involved in the interface based on the policy configuration information and context information to obtain service function status information. The server-side business object can read service function status information indicating the switch result from local memory, record the switch trigger event, and periodically report the switch trigger event in batches to a statistics server. This statistics server is located on the server. In actual applications, the target business object can locally store and back up the obtained service function status information.
[0076] like Figure 5 As shown, the method further includes:
[0077] S501: Generate reference data using the target access service node: The target access service node generates reference data based on information returned to the target service object, basic information of the target service object, and operation object information corresponding to the target service object;
[0078] S502: Using the target access service node, storing the reference data into a statistical database;
[0079] S503: Using an open source stream processing framework to perform real-time processing on the data in the statistical database to generate real-time processing results;
[0080] S504: Using a data warehouse framework to perform offline processing on the data in the statistical database to generate offline processing results.
[0081] Combined with the records of steps S203 and S204, the statistical database corresponding to the statistical server also stores the switch trigger event. Accordingly, the target access service node reports the client-class business object to the statistical database to pull the corresponding service function status information, the client-class business object reports the corresponding service function status information of its own trigger to the statistical server, and the server-class business object reports the corresponding service function status information of its own trigger to the statistical server. In other words, the service function status information corresponds to the two dimensions of pulling and triggering, and the contents of these two dimensions are in the same message channel. This can facilitate the subsequent better perception of the actual distribution of policy configuration information and the actual triggering and generation of service function status information.
[0082] The basic information of the target business object may include the device ID (deviceId), operating system information, and the product ID and product version information corresponding to the target business object. The operation object information corresponding to the target business object may include the user ID (userId), the user's recent operation behavior characteristics information, the user's historical operation behavior characteristics information, etc.
[0083] An open-source stream processing framework can correspond to Flink. Flink is an open-source stream processing framework developed by the Apache Software Foundation. Its core is a distributed streaming data flow engine written in Java and Scala (a multi-paradigm programming language). Flink executes arbitrary streaming data programs in a data-parallel and pipelined manner. Flink's pipeline runtime system can execute both batch and stream processing programs. A data warehouse framework can correspond to Hive, a data warehouse tool based on Hadoop (a distributed system infrastructure developed by the Apache Foundation) that is used for data extraction, transformation, and loading. Flink can be used to process data in statistical databases in real time to generate real-time processing results, while Hive can be used to process data in statistical databases offline to generate offline processing results. Based on the real-time and offline processing results, relevant web pages can be displayed to staff for further data analysis, thereby optimizing the number of switches and better controlling the switch lifecycle. Switch lifecycle control can timely deactivate certain service functions managed by feature switches, ensuring that the local cache size of each node is controllable and avoiding excessive storage pressure on each node.
[0084] As can be seen from the technical solutions provided in the embodiments of this specification, when controlling service functions, different logic settings for distributing service function status information are made according to the different types of target business objects (client class or server class). At the same time, more fine-grained settings are made when selecting target access service nodes in combination with the business attributes of the target business objects. This invention can improve the control adaptability and efficiency of service functions for different types of business objects and optimize the resource utilization rate of target business objects in obtaining service function status information.
[0085] The embodiment of the present invention also provides a service calling device for a business object, such as Figure 8 As shown, the device includes:
[0086] The service call request receiving module 810 is used to receive a service call request sent by a target business object, wherein the service call request carries the business attributes of the target business object and the association information of the current operation object. The target business object is constructed based on the software development kit provided by the service management node;
[0087] The service call request sending module 820 is configured to determine the target access service node corresponding to the target service object according to the service attribute;
[0088] A first policy module 830 is configured to, when the target service object corresponds to a client-type service object, generate service function status information based on the policy configuration information and the association information using the target access service node, and send the service function status information to the target service object;
[0089] The second policy module 840 is used to send policy configuration information to the target business object using the target access service node when the target business object corresponds to a server-type business object, so that the target business object generates service function status information according to the policy configuration information and the associated information.
[0090] It should be noted that the device and method embodiments in the device embodiment are based on the same inventive concept.
[0091] An embodiment of the present invention provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement a service calling method of a business object provided in the above method embodiment.
[0092] Furthermore, Figure 9The hardware structure diagram of an electronic device for implementing the service calling method of the business object provided by the embodiment of the present invention is shown. The electronic device can participate in or include the service calling device of the business object provided by the embodiment of the present invention. Figure 9 As shown, the electronic device 90 may include one or more (902a, 902b, ..., 902n are used to illustrate) processors 902 (the processor 902 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 904 for storing data, and a transmission device 906 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 the I / O interface), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 9 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 9 More or fewer components than shown, or with Figure 9 Different configurations shown.
[0093] It should be noted that the one or more processors 902 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the electronic device 90 (or mobile device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0094] The memory 904 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the methods described in the embodiments of the present invention. The processor 902 executes various functional applications and data processing by running the software programs and modules stored in the memory 94, thereby implementing the service call method of the above-mentioned business object. The memory 904 may include a high-speed random access memory and may also include a 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 904 may further include a memory remotely located relative to the processor 902, and these remote memories may be connected to the electronic device 90 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0095] The transmission device 906 is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by the communication provider of the electronic device 90. In one embodiment, the transmission device 906 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In one embodiment, the transmission device 906 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0096] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 90 (or mobile device).
[0097] An embodiment of the present invention also provides a storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to a service calling method of a business object in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the service calling method of the business object provided by the above method embodiment.
[0098] Optionally, in this embodiment, the storage medium may be located in at least one of a plurality of network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0099] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not represent the superiority or inferiority of the embodiments. The above description is of specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0100] The various embodiments in this specification are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the device and electronic device embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For relevant portions, refer to the descriptions of the method embodiments.
[0101] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0102] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A service calling method of a business object, characterized in that: Applied to a server, the server provides a software development kit, and the method includes: receiving a service call request sent by a target business object, where the sending of the service call request is triggered by the need to use a service function, the service call request carries business attributes and associated information of the target business object, the associated information being context information for running the target business object, and the target business object being a program built based on the software development kit and intended to provide the service function; Determining a target access service node corresponding to the target service object according to the service attribute; When the target service object corresponds to a client-type service object, generating service function status information based on the policy configuration information and the association information by the target access service node, and sending the service function status information to the target service object, the service function status information indicating a feature switch status directed by the service function, and the client-type service object corresponds to a program running on a physical device serving as a service recipient; When the target business object corresponds to a server-type business object, the target access service node is used to send policy configuration information to the target business object so that the target business object generates service function status information according to the policy configuration information and the associated information. The server-type business object corresponds to a program running on a physical device that provides the service.
2. The method according to claim 1, characterized in that Before determining the target access service node corresponding to the target service object according to the service attribute, the method further includes: Get the target program; Configure corresponding business attributes for multiple business objects; A set is created for service objects corresponding to the same service attribute based on the target program, and an access service node is configured for the set.
3. The method according to claim 1, characterized in that When there are multiple access service nodes, before determining the target access service node corresponding to the target service object according to the service attribute, the method further includes: Configuring a corresponding location identifier for each access service node; Accordingly, after determining the target access service node corresponding to the target service object according to the service attribute, the method further includes: Obtaining a target location identifier of the target access service node; A delivery path of the service call request is determined based on the target location identifier.
4. The method according to claim 3, characterized in that When the service call request carries a historical location identifier indicating a historical access service node, determining the target access service node corresponding to the target service object according to the service attribute includes: determining a first delivery path for the service call request based on the historical location identifier; Performing a data query on the business object identifier of the target business object using the historical access service node; When the historical access service node fails to find data associated with the service object identifier, determining the target access service node according to the service attribute; Accordingly, after determining the target access service node corresponding to the target service object according to the service attribute, the method further includes: Querying the current location identifier of the target access service node using a location identifier database; A second delivery path for the service call request is determined based on the current location identifier.
5. The method according to claim 1, wherein After determining the target access service node corresponding to the target service object according to the service attribute, the method further includes: Using the target access service node to obtain current policy configuration information: the target access service node obtains the current policy configuration information from the function management service node based on a distributed coordination service; Utilizing the target access service node to adjust the local policy configuration information: the target access service node adjusts the local policy configuration information based on the current policy configuration information.
6. The method according to claim 5, characterized in that The acquiring, by the target access service node, current policy configuration information from the function management service node based on the distributed coordination service includes: Utilizing the function management service node to update the historical policy configuration information and generate a corresponding update message; Pushing the update message to the distributed coordination service system using the function management service node; When the target access service node monitors that the distributed coordination service system has received an update message, the target access service node is used to obtain the update message from the distributed coordination service system and the update message is used as the current policy configuration information.
7. The method according to claim 6, characterized in that The function management service node includes a management client and a management server. The updating process of the historical policy configuration information and the generation of a corresponding update message by using the function management service node includes: When receiving an update request sent by the management client, configuring identity information for the management client based on the update request; Sending a pass credential matching the identity information to the management client, so that the management client sends the pass credential to the management server; receiving an identity authentication request sent by the management server, wherein the identity authentication request carries the access credential; Returning an identity authentication result to the management server based on the pass credential; When the identity authentication result is successful, the management server is used to update the historical policy configuration information and generate a corresponding update message: the management server determines the update authority of the identity corresponding to the pass credential, updates the historical policy configuration information based on the update authority and the update request, and generates the update message.
8. The method according to claim 1, characterized in that After using the target access service node to send the service function status information to the target service object and using the target access service node to send policy configuration information to the target service object, the method further includes: Generate reference data using the target access service node: the target access service node generates reference data based on information returned to the target service object, basic information of the target service object, and operation object information corresponding to the target service object; Using the target access service node to store the reference data in a statistical database; Using an open source stream processing framework to process the data in the statistical database in real time and generate real-time processing results; The data in the statistical database is processed offline using a data warehouse framework to generate offline processing results.
9. A service calling device for a business object, characterized in that: Configured on a server, the server provides a software development kit, and the device includes: A service call request receiving module is configured to receive a service call request sent by a target business object. The sending of the service call request is triggered by the need to use a service function. The service call request carries the business attributes of the target business object and the association information of the current operation object. The association information is the context information for running the target business object. The target business object is a program built based on the software development kit and intended to provide the service function. A service call request sending module is used to determine the target access service node corresponding to the target service object according to the service attribute; A first policy module is configured to, when the target service object corresponds to a client-type service object, generate service function status information based on the policy configuration information and the association information using the target access service node, and send the service function status information to the target service object, wherein the service function status information indicates a feature switch status of the service function, and the client-type service object corresponds to a program running on a physical device serving as a service recipient; The second policy module is used to send policy configuration information to the target business object using the target access service node when the target business object corresponds to a server-type business object, so that the target business object generates service function status information according to the policy configuration information and the associated information. The server-type business object corresponds to a program running on a physical device that provides the service.
10. The device according to claim 9, characterized in that The device is also used to: before determining the target access service node corresponding to the target business object based on the business attributes, obtain a target program; configure corresponding business attributes for multiple business objects; create a collection for business objects corresponding to the same business attributes based on the target program, and configure an access service node for the collection.
11. The device according to claim 9, characterized in that When there are multiple access service nodes, the device is further configured to: configure a corresponding location identifier for each access service node before determining the target access service node corresponding to the target service object according to the service attribute; Accordingly, the device is further configured to: after determining the target access service node corresponding to the target service object according to the service attribute, obtain a target location identifier of the target access service node; A delivery path of the service call request is determined based on the target location identifier.
12. The device according to claim 11, characterized in that When the service call request carries a historical location identifier indicating a historical access service node, the service call request sending module is further configured to: determine a first transmission path for the service call request based on the historical location identifier; perform a data query on the business object identifier of the target business object using the historical access service node; and determine the target access service node based on the business attribute when the historical access service node fails to find data associated with the business object identifier. Accordingly, the device is further configured to: after determining the target access service node corresponding to the target service object according to the service attribute, query the current location identifier of the target access service node using a location identifier database; A second delivery path for the service call request is determined based on the current location identifier.
13. The device according to claim 9, characterized in that The device is also used to: after determining the target access service node corresponding to the target business object according to the business attributes, use the target access service node to obtain current policy configuration information: the target access service node obtains the current policy configuration information from the function management service node based on the distributed coordination service; use the target access service node to adjust local policy configuration information: the target access service node adjusts the local policy configuration information based on the current policy configuration information.
14. The device according to claim 13, characterized in that The target access service node obtains the current policy configuration information from the function management service node based on the distributed coordination service, including: using the function management service node to update the historical policy configuration information and generate a corresponding update message; using the function management service node to push the update message to the distributed coordination service system; when the target access service node monitors that the distributed coordination service system has received an update message, using the target access service node to obtain the update message from the distributed coordination service system and using the update message as the current policy configuration information.
15. The device according to claim 14, characterized in that The function management service node includes a management client and a management server, and the use of the function management service node to update the historical policy configuration information and generate a corresponding update message includes: when receiving an update request sent by the management client, configuring identity information for the management client based on the update request; sending a pass credential matching the identity information to the management client, so that the management client sends the pass credential to the management server; receiving an authentication request sent by the management server, the authentication request carrying the pass credential; returning an authentication result to the management server based on the pass credential; when the authentication result is successful, using the management server to update the historical policy configuration information and generate a corresponding update message: the management server determines the update authority of the identity corresponding to the pass credential, updates the historical policy configuration information based on the update authority and the update request, and generates the update message.
16. The device according to claim 9, characterized in that The apparatus is further configured to: after using the target access service node to send the service function status information to the target service object and using the target access service node to send policy configuration information to the target service object, generate reference data using the target access service node: the target access service node generates the reference data based on information returned to the target service object, basic information of the target service object, and operation object information corresponding to the target service object; Using the target access service node to store the reference data in a statistical database; An open source stream processing framework is used to perform real-time processing on the data in the statistical database to generate real-time processing results; a data warehouse framework is used to perform offline processing on the data in the statistical database to generate offline processing results.
17. A computer-readable storage medium, characterized in that The storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the service calling method of the business object according to any one of claims 1 to 8.
18. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the service calling method of the business object as claimed in any one of claims 1-8.
Citation Information
Patent Citations
Dynamic micro-service calling method and device of multi-language cloud compiling
CN106227611A
Distributed system based grayscale issuing method, client and platform
CN106487863A
Data processing method and device
CN110209492A
Authorization authentication configuration method and device, authorization authentication method and device and electronic equipment
CN111064708A