CN116016379A - Method, device, electronic equipment and storage medium for resource sharing - Google Patents

Method, device, electronic equipment and storage medium for resource sharing Download PDF

Info

Publication number
CN116016379A
CN116016379A CN202211635512.6A CN202211635512A CN116016379A CN 116016379 A CN116016379 A CN 116016379A CN 202211635512 A CN202211635512 A CN 202211635512A CN 116016379 A CN116016379 A CN 116016379A
Authority
CN
China
Prior art keywords
resource
interface
response
requester
return
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211635512.6A
Other languages
Chinese (zh)
Inventor
申士佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Apollo Zhilian Beijing Technology Co Ltd
Apollo Zhixing Technology Guangzhou Co Ltd
Original Assignee
Apollo Zhilian Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Apollo Zhilian Beijing Technology Co Ltd filed Critical Apollo Zhilian Beijing Technology Co Ltd
Priority to CN202211635512.6A priority Critical patent/CN116016379A/en
Publication of CN116016379A publication Critical patent/CN116016379A/en
Pending legal-status Critical Current

Links

Images

Abstract

The disclosure provides a method, a device, electronic equipment and a storage medium for resource sharing, relates to the technical field of computers, and particularly relates to the field of micro-service architecture. The implementation scheme is as follows: in response to obtaining an instruction of the resource provider, providing a resource configuration page for the resource provider, such that the resource provider configures interface information based on the resource configuration page, the interface information indicating an interface for calling a resource provided by the resource provider and a plurality of return fields capable of returning when passing through the interface; in response to determining that the resource provider completes configuration of the resource information, and in response to receiving a request from the resource requester, providing the resource requester with a plurality of items corresponding to the plurality of return fields, respectively; and in response to determining that the resource requester selects a target item from the plurality of items, obtaining, by the call interface, a target return field corresponding to the target item from the plurality of return fields.

Description

Method, device, electronic equipment and storage medium for resource sharing
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to the field of micro-service architecture, and more particularly, to a method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product for resource sharing.
Background
By means of resource sharing and exchange of the cloud platform, a resource user obtains data provided by a resource provider through an interface through a request and call of a service. Meanwhile, by means of the operation support system of the cloud platform, a resource operator and a terminal resource consumer are introduced through service capability opening, so that resource increment, consumer resource mining and open-platform ecological construction of the three-party win-win platform product are realized.
The approaches described in this section are not necessarily approaches that have been previously conceived or pursued. Unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, the problems mentioned in this section should not be considered as having been recognized in any prior art unless otherwise indicated.
Disclosure of Invention
The present disclosure provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for resource sharing.
According to an aspect of the present disclosure, there is provided a method for resource sharing, including: providing a resource configuration page for a resource provider in response to an instruction of the resource provider, so that the resource provider configures interface information based on the resource configuration page, the interface information indicating an interface for calling a resource provided by the resource provider and a plurality of return fields capable of returning when passing through the interface, each of the plurality of return fields indicating a part of the resource; in response to determining that the resource provider completes configuration of the resource information, and in response to receiving a request from a resource requester, providing the resource requester with a plurality of items corresponding to the plurality of return fields, respectively; and in response to determining that the resource requester selects a target item from the plurality of items, obtaining a target return field corresponding to the target item from the plurality of return fields by invoking the interface to provide to the resource requester.
According to another aspect of the present disclosure, there is provided an apparatus for resource sharing, including: a first response unit configured to provide a resource configuration page for a resource provider in response to an instruction to obtain the resource provider, so that the resource provider configures interface information based on the resource configuration page, the interface information indicating an interface for calling a resource provided by the resource provider and a plurality of return fields capable of being returned when passing through the interface, each of the plurality of return fields indicating a part of the resource; a second response unit configured to, in response to determining that the resource provider completes configuration of the resource information, and in response to receiving a request of a resource requester, provide the resource requester with a plurality of items corresponding to the plurality of return fields, respectively; and a first acquisition unit configured to acquire a target return field corresponding to the target item from among the plurality of return fields by invoking the interface to provide to the resource requester in response to determining that the resource requester selects the target item from the plurality of items.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method according to embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method according to an embodiment of the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements a method according to embodiments of the present disclosure.
According to one or more embodiments of the present disclosure, resource requirements of different granularities of resource requesters may be met.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The accompanying drawings illustrate exemplary embodiments and, together with the description, serve to explain exemplary implementations of the embodiments. The illustrated embodiments are for exemplary purposes only and do not limit the scope of the claims. Throughout the drawings, identical reference numerals designate similar, but not necessarily identical, elements.
FIG. 1 illustrates a flow chart of a method for resource sharing according to an embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of a process for providing a plurality of items corresponding to the plurality of return fields, respectively, to the resource requester in a method for resource sharing in accordance with an embodiment of the present disclosure;
FIG. 3 illustrates a flow chart of a process for obtaining the target return field by invoking the interface in a method for resource sharing according to an embodiment of the present disclosure;
fig. 4 illustrates a flow chart of a process for assigning an authentication token to the resource requester in a method for resource sharing in accordance with an embodiment of the present disclosure;
FIG. 5 illustrates a flow chart of a process for obtaining the target return field by invoking the interface in a method for resource sharing according to an embodiment of the present disclosure;
FIG. 6 illustrates a flow chart of a process for obtaining the target return field by invoking the interface in a method for resource sharing according to an embodiment of the present disclosure;
FIG. 7 illustrates a schematic diagram of a process of obtaining the target return field by invoking the interface in a method for resource sharing according to an embodiment of the present disclosure;
FIG. 8 shows a block diagram of an apparatus for resource sharing according to an embodiment of the disclosure; and
fig. 9 illustrates a block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, the use of the terms "first," "second," and the like to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of the elements, unless otherwise indicated, and such terms are merely used to distinguish one element from another element. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, they may also refer to different instances based on the description of the context.
The terminology used in the description of the various illustrated examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, the elements may be one or more if the number of the elements is not specifically limited. Furthermore, the term "and/or" as used in this disclosure encompasses any and all possible combinations of the listed items.
Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
According to an aspect of the present disclosure, a method for resource sharing is provided. As shown in fig. 1, a method 100 for resource sharing according to some embodiments of the present disclosure includes:
step S110: providing a resource configuration page for a resource provider in response to an instruction of the resource provider, so that the resource provider configures interface information based on the resource configuration page, the interface information indicating an interface for calling a resource provided by the resource provider and a plurality of return fields capable of returning when passing through the interface, each of the plurality of return fields indicating a part of the resource;
Step S120: in response to determining that the resource provider completes configuration of the resource information, and in response to receiving a request from a resource requester for requesting a target return field of the plurality of return fields, providing the resource requester with a plurality of items corresponding to the plurality of return fields, respectively; and
step S130: in response to determining that the resource requester selects a target item from the plurality of items that corresponds to the target return field, the target return field is obtained by invoking the interface to provide to the resource requester.
In the related art, the supporting operation platform can only provide resources owned by the resource provider through the interface transparent transmission. For example, when providing traffic light data owned by a resource provider (e.g., government), by providing an interface for traffic light data, all traffic light related data (phase, latitude and longitude, etc.) is provided to a downstream resource requester (e.g., business) at the same time, while the resource requester may only need a portion of the traffic light data (e.g., latitude and longitude) in the process of developing, thus failing to meet the resource requirements of the resource requester with finer granularity.
In the embodiment of the disclosure, by providing the resource configuration page for the resource provider, the resource provider configures the interface information, so that the resource requester can provide a plurality of items corresponding to a plurality of return fields when requesting the resource, and thus when the resource requester requests a target field required by the resource requester in a plurality of fields, the resource requester can call the interface after selecting the target item corresponding to the target field in the plurality of items, and the target return field is obtained to be provided for the resource requester, thereby meeting the resource requirements of the resource requester with different granularities. In the whole process, the resource provider divides the provided resources with different granularities, so that the value of the resources provided by the resource provider is improved, and the resource requester can avoid the loss and waste of the resources caused by unordered calling of the resources by requesting the resources required by the resource requester instead of all the resources.
In some embodiments, methods for resource sharing according to the present disclosure are implemented by providing an operational support platform. The operation support platform is arranged on the basis of the cloud platform, and provides a management platform for the resource requesters and the resource providers, so that the resource providers realize the functions of project management, order management, customer management, business statistics and the like through the management platform, and meanwhile, the resource requesters realize the functions of project service, order management, business statistics and the like through the management platform. Meanwhile, providing an entry guide, developing a document, and the like for a resource requester as an individual, for example, a developer, is again not limited.
In some embodiments, the resource may be various types of data, such as papers, images, statistics, etc., without limitation.
In some embodiments, the resource provider may be a database provider that provides a database containing data and through an open interface enables a requestor that needs the data to obtain the data in the database by calling the interface.
In some embodiments, the resource requester may be a data demander, e.g., an enterprise or an individual user, who obtains the required data by operating the support system to invoke an interface provided by the resource provider.
In some embodiments, in step S110, a resource provider page is first provided for receiving an instruction of the resource provider, where the instruction is issued by the resource provider based on an operation on the resource provider page, and instructs the resource provider to provide a corresponding resource.
In some embodiments, in step S110, in response to receiving an instruction from the resource provider, a resource configuration page is provided for the resource provider, so that the resource provider configures its own resources through the resource configuration page.
For example, the resource provider completes configuration of the interface resource by configuring the interface path, the interface return field, and the like.
In some embodiments, the repository-dropping persistence process is performed at the backend in response to the resource provider completing the configuration of the interface resources.
In some embodiments, in step S120, a plurality of items are provided to the resource requester through a resource requester page. For example, by exposing the plurality of items to the resource requester in the form of a plurality of goods or products, the resource requester is enabled to select or purchase the items required by itself on the resource requester's page.
In some embodiments, the method for resource sharing according to the present disclosure further comprises:
providing a rule configuration page to cause the resource provider to configure an interface parameter based on the rule configuration page, the interface parameter indicating a limit for each of the plurality of return fields, the limit indicating that a respective one of a plurality of types of resource requesters is allowed to obtain the return field;
determining an item corresponding to each of the plurality of return fields, the item indicating an interface configuration parameter for the return field; and as shown in fig. 2, providing the resource requester with a plurality of items corresponding to the plurality of return fields, respectively, in step S120 includes:
Step S210: obtaining a type of the resource requester among the plurality of types; and
step S220: providing the visible item in the plurality of items to the resource requester, wherein the limit indicated by the interface configuration parameter of the visible item indicates that the resource requester of the type to which the visible item belongs is allowed to obtain a return field corresponding to the visible item.
By providing the rule configuration page, the resource provider is enabled to configure interface parameters based on the rule configuration page, thereby enabling the resource provider to provide customized items for different resource requesters.
In some embodiments, the interface parameters include default enumerated limits, default time period limits, etc., and custom rules are set by modifying whether the return field is visible, thereby packaging the resource into different items, enabling the provision of custom items for the resource requester.
In some embodiments, in step S120, the visible item for which the resource requester is allowed to obtain the corresponding return field, i.e., the item for which the resource requester has the right to obtain, i.e., the item visible to its resource requester, is presented through the resource requester page.
In some embodiments, as shown in fig. 3, in step S130, in response to determining that the resource requester selects a target item corresponding to the target return field from the plurality of items, obtaining the target return field by invoking the interface includes:
step S310: assigning an authentication token to the resource requester in response to a selection instruction of the resource requester, the selection instruction instructing the resource requester to select a target item from the plurality of items to cause the resource requester to invoke the interface based on the authentication token;
step S320: authenticating the resource requester based on the authentication token to determine whether the requester is able to obtain the target item; and
step S330: in response to determining that the requestor is able to obtain the target item, the target item is determined to be the target item.
When the resource requester calls the interface aiming at the target item, the authentication token (token) is distributed for the resource requester to authenticate the resource requester, so that the safety of the resource requester in the process of acquiring the resource is ensured, and the resource loss caused by unordered call is avoided.
For example, before the resource requester calls the interface, the data gateway calls the data gateway by the distributed authentication token, the data gateway verifies the identity of the resource requester by the authentication token carried by the authentication token when the interface is called, and when the resource requester is verified to pass, the interface is called to receive a return value and return the return value to the resource requester.
In some embodiments, the resource requester is also assigned a product code (product code) indicating the item it selects before invoking the interface; when the resource requester calls the interface, the data gateway also inquires the parameters configured by the project according to the product code transmitted by the resource requester and calls the interface by carrying the parameters, after receiving the return value, the data gateway matches and judges whether the return value is consistent with the return value configured by the project, if so, the data gateway returns to the user, thereby further ensuring the safety of the resource requester in the process of acquiring the resource.
In some embodiments, as shown in fig. 4, in step S310, the assigning an authentication token to the resource requester includes:
step S410: obtaining a user identity of the resource requester;
Step S420: generating the authentication token based on the user identity; and
step S430: and sending the authentication token to the resource requester.
And generating an authentication token based on the user identity, dynamically generating access authentication, and improving the security of an access channel.
It should be understood that the resource requester may be an enterprise or an individual within an enterprise, and is not limited herein. When the resource requester is an enterprise, a plurality of users can share one user identity, and when the resource requester is a person in the enterprise, the plurality of users can respectively use different user identities.
In some embodiments, during authentication of the resource requester, the resource requester is further charged by the charging logic to further provide a completed product sales, purchase link.
For example, in some embodiments, as shown in fig. 5, in response to determining that the resource requester selects a target item from the plurality of items, obtaining a target return field corresponding to the target item from the plurality of return fields by invoking the interface in step S130 includes:
step S510: determining an account balance of the resource requester; and
Step S520: and calling the interface in response to determining that the account balance exceeds the price corresponding to the target item.
And by checking the account balance, the full-path service of product selection and purchase of the user is realized.
In some embodiments, in response to determining that the resource requester selects a target item from the plurality of items, obtaining a target return field of the plurality of return fields corresponding to the target item by invoking the interface in step S130 includes:
and in response to receiving a target return field from the interface, updating the account balance to obtain an updated account balance, wherein the updated account balance indicates that the account balance deducts the balance after the price corresponding to the target item.
And updating the account balance of the resource requester after receiving the target return field from the interface, so that the whole system service logic realizes the closed-loop charging logic.
In some embodiments, a plurality of selectable pay modes may be provided for the resource requester to select for the resource requester to update the account balance based on the pay mode selected by the resource requester during the updating of the account balance. For example, alternative pay modes include pay-per-view, and the like.
In some embodiments, as shown in fig. 6, in step S130, the obtaining, in response to determining that the resource requester selects a target item from the plurality of items, a target return field corresponding to the target item from the plurality of return fields by invoking the interface includes:
step S610: generating an acquisition path for acquiring the target return field based on the interface and the target item; and
step S620: and calling the interface based on the acquisition path to acquire the target return field.
According to an embodiment of the present disclosure, the process of external API (Application Programming Interface ) service generation is completed by dynamically generating an acquisition path and a service path of a target return field corresponding to a target item based on an interface and the target item.
According to the embodiment of the disclosure, the method and the device realize that the resource (such as a database) provided by the same resource provider is called through different gateways based on the dynamic gateway, so that different parts in the resource are obtained.
Referring to fig. 7, a schematic diagram of a process for invoking an interface in a method for resource sharing according to some embodiments of the present disclosure is shown. When the resource requester starts to call the interface, the resource requester is authenticated 710, and whether the resource requester passes the authentication is determined. When the resource requester fails authentication, performing exception prompt to display to the resource requester; when the resource requester passes the authentication, a balance of the resource requester is remembered 720 to determine whether the account balance of the resource requester is sufficient (sufficient to pay for the selected item). When the balance is judged to be insufficient, an exception prompt is carried out to display to the resource requester, and when the balance is judged to be sufficient, the interface of the resource provider is started to be called 730, wherein the interface can be called in a Http mode or in an LB mode. When the return field of the interface is obtained, the call 740 is ended, and whether the call is successful is judged, wherein whether the call is successful is judged by comparing the return field of the interface with the return field configured by the selected item of the resource requester, if the call is determined to be successful, the balance is deducted 750 on the account of the resource requester, and if the call is determined to be unsuccessful, the call record is saved. After deducting the balance 750, further judging whether the deduction is successful, for example, by comparing the account balance of the resource requester before deducting the balance 750 with the account balance after deducting the balance 750, judging whether the deduction is successful, if the deduction is determined to be unsuccessful, performing abnormal prompt to display to the resource requester, if the deduction is determined to be successful, storing the calling record.
In some embodiments, the method for resource sharing according to the present disclosure further comprises: in response to obtaining a plurality of requests of a plurality of resource requesters, determining network traffic corresponding to each of the plurality of resource requesters, wherein the network traffic indicates network transmission speed of a return field corresponding to an item selected by the resource requester when the return field is obtained from the plurality of return fields by calling the interface; and
the interface is invoked for each of the plurality of resource requesters based on the network traffic.
By controlling the access flow of the interface, the system (such as a database) of the resource provider is prevented from being crowded or paralyzed due to the excessive access flow of the interface, and each resource requester is ensured to access smoothly.
According to another aspect of the present disclosure, there is also provided an apparatus for resource sharing, as shown in fig. 8, an apparatus 800 including: a first response unit 810 configured to provide a resource configuration page for a resource provider in response to an instruction to obtain the resource provider, so that the resource provider configures interface information based on the resource configuration page, the interface information indicating an interface for calling a resource provided by the resource provider and a plurality of return fields capable of being returned when passing through the interface, each of the plurality of return fields indicating a part of the resource; a second response unit 820 configured to provide a plurality of items respectively corresponding to the plurality of return fields to a resource requester in response to determining that the resource provider completes configuration of the resource information and in response to receiving a request from the resource requester for requesting a target return field of the plurality of return fields; and a first obtaining unit 830 configured to obtain the target return field by calling the interface to provide to the resource requester in response to determining that the resource requester selects a target item corresponding to the target return field from the plurality of items.
In some embodiments, the apparatus 800 further comprises: a rule configuration unit configured to provide a rule configuration page to cause the resource provider to configure an interface parameter based on the rule configuration page, the interface parameter indicating a restriction for each of the plurality of return fields, the restriction indicating that a corresponding one of a plurality of types of resource requesters is allowed to obtain the return field, and a first determination unit configured to determine an item corresponding to each of the plurality of return fields, the item indicating an interface configuration parameter of the return field; and wherein the second response unit includes: a second acquisition unit configured to acquire a type to which the resource requester belongs among the plurality of types; and a second response subunit configured to provide a visible item of the plurality of items to the resource requester, wherein the restriction indicated by the interface configuration parameter of the visible item indicates that the resource requester of the type to which the visible item belongs is allowed to obtain a return field corresponding to the visible item.
In some embodiments, the first acquisition unit 830 includes: a third response unit configured to assign an authentication token to the resource requester in response to a selection instruction of the resource requester, the selection instruction instructing the resource requester to select a target item from the plurality of items so that the resource requester invokes the interface based on the authentication token; an authentication unit configured to authenticate the resource requester based on the authentication token to determine whether the requester is able to obtain the target item; and a fourth response unit configured to determine the target item as the target item in response to determining that the target item is available to the requester.
In some embodiments, the third response unit includes: a third obtaining unit configured to obtain a user identity of the resource requester; a token generation unit configured to generate the authentication token based on the user identity; and a transmitting unit configured to transmit the authentication token to the resource requester.
In some embodiments, the first acquisition unit 830 includes: a generation unit configured to acquire path generation unit configured to generate an acquisition path for acquiring the target return field based on the interface and the target item; and a first calling unit configured to call the interface based on the acquisition path to acquire the target return field.
In some embodiments, the first acquisition unit 830 includes: a second determining unit configured to determine an account balance of the resource requester; and a second calling unit configured to call the interface in response to determining that the account balance exceeds a price corresponding to the target item.
In some embodiments, the first acquisition unit 830 includes: and the updating unit is configured to update the account balance to obtain an updated account balance in response to receiving a target return field from the interface, wherein the updated account balance indicates the account balance to deduct the balance after the price corresponding to the target item.
In some embodiments, the apparatus 800 further comprises: a third determining unit configured to determine, in response to obtaining a plurality of requests of a plurality of resource requesters, a network traffic corresponding to each of the plurality of resource requesters, the network traffic indicating a network transmission speed of a return field corresponding to an item selected by the resource requester among the plurality of return fields by calling the interface; and a third calling unit configured to call the interface based on the network traffic for each of the plurality of resource requesters.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
According to embodiments of the present disclosure, there is also provided an electronic device, a readable storage medium and a computer program product.
Referring to fig. 9, a block diagram of an electronic device 900 that may be a server or a client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 9, the electronic device 900 includes a computing unit 901 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 902 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In the RAM903, various programs and data required for the operation of the electronic device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM903 are connected to each other by a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
A number of components in the electronic device 900 are connected to the I/O interface 905, including: an input unit 906, an output unit 907, a storage unit 908, and a communication unit 909. The input unit 906 may be any type of device capable of inputting information to the electronic device 900, the input unit 906 may receive input numeric or character information and generate key signal inputs related to user settings and/or function control of the electronic device, and may include, but is not limited to, a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone, and/or a remote control. The output unit 907 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, video/audio output terminals, vibrators, and/or printers. Storage unit 908 may include, but is not limited to, magnetic disks, optical disks. The communication unit 909 allows the electronic device 900 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth (TM) devices, 802.11 devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as method 90. For example, in some embodiments, the method 100 may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 900 via the ROM 902 and/or the communication unit 909. When the computer program is loaded into RAM 903 and executed by computing unit 901, one or more steps of method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the method 100 by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
Although embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it is to be understood that the foregoing methods, systems, and apparatus are merely exemplary embodiments or examples, and that the scope of the present invention is not limited by these embodiments or examples but only by the claims following the grant and their equivalents. Various elements of the embodiments or examples may be omitted or replaced with equivalent elements thereof. Furthermore, the steps may be performed in a different order than described in the present disclosure. Further, various elements of the embodiments or examples may be combined in various ways. It is important that as technology evolves, many of the elements described herein may be replaced by equivalent elements that appear after the disclosure.

Claims (19)

1. A method for resource sharing, comprising:
providing a resource configuration page for a resource provider in response to an instruction of the resource provider, so that the resource provider configures interface information based on the resource configuration page, the interface information indicating an interface for calling a resource provided by the resource provider and a plurality of return fields capable of returning when passing through the interface, each of the plurality of return fields indicating a part of the resource;
In response to determining that the resource provider completes configuration of the resource information, and in response to receiving a request from a resource requester for requesting a target return field of the plurality of return fields, providing the resource requester with a plurality of items corresponding to the plurality of return fields, respectively; and
in response to determining that the resource requester selects a target item from the plurality of items that corresponds to the target return field, the target return field is obtained by invoking the interface to provide to the resource requester.
2. The method of claim 1, further comprising:
providing a rule configuration page to cause the resource provider to configure an interface parameter based on the rule configuration page, the interface parameter indicating a limit for each of the plurality of return fields, the limit indicating that a respective one of a plurality of types of resource requesters is allowed to obtain the return field;
determining an item corresponding to each of the plurality of return fields, the item indicating an interface configuration parameter for the return field; and said providing the resource requestor with a plurality of items corresponding to the plurality of return fields, respectively, includes:
Obtaining a type of the resource requester among the plurality of types; and
providing the visible item in the plurality of items to the resource requester, wherein the limit indicated by the interface configuration parameter of the visible item indicates that the resource requester of the type to which the visible item belongs is allowed to obtain a return field corresponding to the visible item.
3. The method of claim 1, wherein the obtaining the target return field by invoking the interface in response to determining that the resource requestor selects a target item from the plurality of items that corresponds to the target return field comprises:
assigning an authentication token to the resource requester in response to a selection instruction of the resource requester, the selection instruction instructing the resource requester to select a target item from the plurality of items to cause the resource requester to invoke the interface based on the authentication token;
authenticating the resource requester based on the authentication token to determine whether the requester is able to obtain the target item; and
in response to determining that the requestor is able to obtain the target item, the target item is determined to be the target item.
4. The method of claim 3, wherein the assigning an authentication token to the resource requester comprises:
obtaining a user identity of the resource requester;
generating the authentication token based on the user identity; and
and sending the authentication token to the resource requester.
5. The method of claim 1, wherein the obtaining, by invoking the interface, a target return field of the plurality of return fields corresponding to the target item in response to determining that the resource requestor selects the target item from the plurality of items comprises:
generating an acquisition path for acquiring the target return field based on the interface and the target item; and
and calling the interface based on the acquisition path to acquire the target return field.
6. The method of claim 1, wherein the obtaining, by invoking the interface, a target return field of the plurality of return fields corresponding to the target item in response to determining that the resource requestor selects the target item from the plurality of items comprises:
determining an account balance of the resource requester; and
And calling the interface in response to determining that the account balance exceeds the price corresponding to the target item.
7. The method of claim 6, wherein the obtaining, by invoking the interface, a target return field of the plurality of return fields corresponding to the target item in response to determining that the resource requestor selects the target item from the plurality of items comprises:
and in response to receiving a target return field from the interface, updating the account balance to obtain an updated account balance, wherein the updated account balance indicates that the account balance deducts the balance after the price corresponding to the target item.
8. The method of claim 1, further comprising:
in response to obtaining a plurality of requests of a plurality of resource requesters, determining network traffic corresponding to each of the plurality of resource requesters, wherein the network traffic indicates network transmission speed of a return field corresponding to an item selected by the resource requester when the return field is obtained from the plurality of return fields by calling the interface; and
the interface is invoked for each of the plurality of resource requesters based on the network traffic.
9. An apparatus for resource sharing, comprising:
a first response unit configured to provide a resource configuration page for a resource provider in response to an instruction to obtain the resource provider, so that the resource provider configures interface information based on the resource configuration page, the interface information indicating an interface for calling a resource provided by the resource provider and a plurality of return fields capable of being returned when passing through the interface, each of the plurality of return fields indicating a part of the resource;
a second response unit configured to provide a plurality of items respectively corresponding to the plurality of return fields to a resource requester in response to determining that the resource provider completes configuration of the resource information and in response to receiving a request from the resource requester for requesting a target return field of the plurality of return fields; and
a first obtaining unit configured to obtain, by invoking the interface, the target return field for providing to the resource requester, in response to determining that the resource requester selects a target item corresponding to the target return field from the plurality of items.
10. The apparatus of claim 9, further comprising:
a rule configuration unit configured to provide a rule configuration page to cause the resource provider to configure an interface parameter based on the rule configuration page, the interface parameter indicating a restriction for each of the plurality of return fields, the restriction indicating that a corresponding one of a plurality of types of resource requesters is allowed to obtain the return field, and
a first determining unit configured to determine an item corresponding to each of the plurality of return fields, the item indicating an interface configuration parameter of the return field; and wherein the second response unit includes:
a second acquisition unit configured to acquire a type to which the resource requester belongs among the plurality of types; and
a second response subunit configured to provide a visible item of the plurality of items to the resource requester, wherein the restriction indicated by the interface configuration parameter of the visible item indicates that the resource requester of the type to which the visible item belongs is allowed to obtain a return field corresponding to the visible item.
11. The apparatus of claim 9, wherein the first acquisition unit comprises:
A third response unit configured to assign an authentication token to the resource requester in response to a selection instruction of the resource requester, the selection instruction instructing the resource requester to select a target item from the plurality of items so that the resource requester invokes the interface based on the authentication token;
an authentication unit configured to authenticate the resource requester based on the authentication token to determine whether the requester is able to obtain the target item; and
and a fourth response unit configured to determine the target item as the target item in response to determining that the target item is available to the requester.
12. The apparatus of claim 11, wherein the third response unit comprises:
a third obtaining unit configured to obtain a user identity of the resource requester;
a token generation unit configured to generate the authentication token based on the user identity; and
and the sending unit is configured to send the authentication token to the resource requester.
13. The apparatus of claim 9, wherein the first acquisition unit comprises:
A generation unit configured to acquire path generation unit configured to generate an acquisition path for acquiring the target return field based on the interface and the target item; and
and the first calling unit is configured to call the interface based on the acquisition path to acquire the target return field.
14. The apparatus of claim 9, wherein the first acquisition unit comprises:
a second determining unit configured to determine an account balance of the resource requester; and
and the second calling unit is configured to call the interface in response to determining that the account balance exceeds the price corresponding to the target item.
15. The apparatus of claim 14, wherein the first acquisition unit comprises:
and the updating unit is configured to update the account balance to obtain an updated account balance in response to receiving a target return field from the interface, wherein the updated account balance indicates the account balance to deduct the balance after the price corresponding to the target item.
16. The apparatus of claim 9, further comprising:
a third determining unit configured to determine, in response to obtaining a plurality of requests of a plurality of resource requesters, a network traffic corresponding to each of the plurality of resource requesters, the network traffic indicating a network transmission speed of a return field corresponding to an item selected by the resource requester among the plurality of return fields by calling the interface; and
And a third calling unit configured to call the interface based on the network traffic for each of the plurality of resource requesters.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the method comprises the steps of
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-8.
19. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the method of any of claims 1-8.
CN202211635512.6A 2022-12-19 2022-12-19 Method, device, electronic equipment and storage medium for resource sharing Pending CN116016379A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211635512.6A CN116016379A (en) 2022-12-19 2022-12-19 Method, device, electronic equipment and storage medium for resource sharing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211635512.6A CN116016379A (en) 2022-12-19 2022-12-19 Method, device, electronic equipment and storage medium for resource sharing

Publications (1)

Publication Number Publication Date
CN116016379A true CN116016379A (en) 2023-04-25

Family

ID=86018566

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211635512.6A Pending CN116016379A (en) 2022-12-19 2022-12-19 Method, device, electronic equipment and storage medium for resource sharing

Country Status (1)

Country Link
CN (1) CN116016379A (en)

Similar Documents

Publication Publication Date Title
CN109710236B (en) Service development and implementation method, device, platform and medium based on shared service
US9645914B1 (en) Apps store with integrated test support
JP2023520415A (en) Methods and systems for target-based hyperparameter tuning
CN110765024A (en) Simulation test method, simulation test device, electronic equipment and computer-readable storage medium
US11283737B2 (en) Application initiated conversations for chatbots
US10656939B2 (en) Modeling lifetime of hybrid software application using application manifest
EP2965201A1 (en) Adaptive data synchronization
WO2020211360A1 (en) Mock test method and system, electronic device, and computer non-volatile readable storage medium
US20210319347A1 (en) Fast and scalable multi-tenant serve pool for chatbots
CN110766394A (en) Bus taking payment method and device based on credit degree, electronic equipment and storage medium
CN109828830B (en) Method and apparatus for managing containers
CN113010561B (en) Data acquisition method and device based on super account book and computer system
CN113010238A (en) Permission determination method, device and system for micro application call interface
CN115883310A (en) Service deployment method, service deployment system, electronic device, and storage medium
CN116150249B (en) Table data export method, apparatus, electronic device and computer readable medium
CN116016379A (en) Method, device, electronic equipment and storage medium for resource sharing
CN115883267A (en) Charging method, device and storage medium for block chain intelligent contract calling
CN113079085B (en) Business service interaction method, business service interaction device, business service interaction equipment and storage medium
CN114003510A (en) Script testing method, device, equipment and medium based on Mock service
CN113946816A (en) Cloud service-based authentication method and device, electronic equipment and storage medium
CN113778546A (en) Method and device for gray scale optimization
US11023672B1 (en) Dynamic service injection
US20190066161A1 (en) Predictive system for selecting groups of users in connection with a network service
CN111147470A (en) Account authorization method and device and electronic equipment
CN111770170B (en) Request processing method, device, equipment and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20231008

Address after: 100176 101, floor 1, building 1, yard 7, Ruihe West 2nd Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Applicant after: Apollo Zhilian (Beijing) Technology Co.,Ltd.

Applicant after: Apollo Zhixing Technology (Guangzhou) Co.,Ltd.

Address before: 100176 101, floor 1, building 1, yard 7, Ruihe West 2nd Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Applicant before: Apollo Zhilian (Beijing) Technology Co.,Ltd.