CN112783638A - Method, apparatus, medium, and device for implementing data processing by calling service - Google Patents

Method, apparatus, medium, and device for implementing data processing by calling service Download PDF

Info

Publication number
CN112783638A
CN112783638A CN201911082800.1A CN201911082800A CN112783638A CN 112783638 A CN112783638 A CN 112783638A CN 201911082800 A CN201911082800 A CN 201911082800A CN 112783638 A CN112783638 A CN 112783638A
Authority
CN
China
Prior art keywords
service
submission amount
response time
submission
amount
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
CN201911082800.1A
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.)
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Wodong Tianjun Information 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 Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Wodong Tianjun Information Technology Co Ltd
Priority to CN201911082800.1A priority Critical patent/CN112783638A/en
Publication of CN112783638A publication Critical patent/CN112783638A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

Abstract

The disclosure provides a method and a device for realizing data processing by calling service, a computer readable medium and electronic equipment, and relates to the technical field of data processing. The method comprises the following steps: determining the current load capacity of a service provider in response to receiving a data transmission request of a service caller, so as to determine a proposed submission amount according to the current load capacity; and sending the suggested submission amount to the service caller so that the service caller submits the task to the service provider according to the suggested submission amount. According to the technical scheme, the load capacity of the service provider can be dynamically sensed, the service caller can adapt to the change of the load capacity of the service provider according to the current load capacity of the service provider, the safety and reliability of the system are enhanced, manual operation is saved, and the utilization rate of service resources can be improved.

Description

Method, apparatus, medium, and device for implementing data processing by calling service
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a method and an apparatus for implementing data processing by invoking a service, a computer-readable medium, and an electronic device.
Background
No matter the traditional enterprise or the emerging Internet enterprise, along with the development and growth, an information system is more and more complex, and the system architecture of All-In-One is difficult to meet the requirements of performance and easy maintenance. Accordingly, such architectures are increasingly being replaced by Service-Oriented architectures (SOAs). In the SOA, an original system is vertically split into a plurality of systems, and the split systems cooperate to complete related business through service calling.
In the prior art, for different services called in a data interaction process between SOA-based systems, the processing capabilities of the different services to external requests are different in view of the constraints of hardware environment, system resources or architecture.
In the prior art, the problem of low utilization rate of service resources exists in the scheme of realizing data processing by calling services.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a method for implementing data processing by invoking a service, a device for implementing data processing by invoking a service, a computer-readable medium, and an electronic device, thereby improving the utilization rate of service resources at least to a certain extent.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to a first aspect of the embodiments of the present disclosure, there is provided a method for implementing data processing by invoking a service, the method including:
responding to a data sending request received from a service caller, determining the current load capacity of a service provider, and determining a proposed submission amount according to the current load capacity; and sending the suggested submission amount to the service caller so that the service caller submits tasks to the service provider according to the suggested submission amount.
In an embodiment of the present disclosure, based on the foregoing solution, the determining the current load capacity of the service provider includes: constructing a prediction model about the suggested submission amount according to the relationship between the service response time and the task submission amount; and determining the current load capacity of the service provider according to the test data of the service in the physical environment based on the prediction model.
In an embodiment of the disclosure, based on the foregoing solution, the determining the recommended submission amount according to the current load capacity includes: determining the safety response time according to the current load capacity; and determining the recommended submission amount according to the safe response time based on the prediction model.
In an embodiment of the present disclosure, based on the foregoing solution, the relationship between the service response time and the task submission amount is as shown in the following formula one and formula two:
Figure BDA0002264475810000021
Q=γ×τ+θ τ>τsafeformula two
Wherein Q is the task submission amount, τ is the service response time, τsafeFor the above safe response time, α is a first coefficient, β is a second coefficient, γ is a third coefficient, and θ is a fourth coefficient.
In an embodiment of the present disclosure, based on the foregoing solution, the determining a proposed commit amount according to the safety response time based on the prediction model includes: if the reference response time length corresponding to the last service call is less than or equal to the safety response time, then:
substituting the reference response duration and the reference submission amount corresponding to the last service call into the formula I to obtain an actual value of the first coefficient; and substituting the actual value of the first coefficient and the safety response time into the formula I to obtain a first proposed submission amount.
In an embodiment of the present disclosure, based on the foregoing solution, the determining a proposed commit amount according to the safety response time based on the prediction model includes: if the reference response time length corresponding to the last service call is longer than the safety response time, then:
substituting the reference response duration and the reference submission amount corresponding to the last service call into the formula II to obtain an actual value of the fourth coefficient; and substituting the actual value of the fourth coefficient and the safety response time into the formula II to obtain a second proposed submission amount.
In an embodiment of the present disclosure, based on the foregoing scheme, before the service invoker submits the task to the service provider according to the proposed submission amount, the method further includes: storing the task to be submitted to a cache pool of the service calling party;
in this embodiment, the submitting a task to the service provider by the service caller according to the proposed submission amount includes: and the service caller acquires the tasks to be submitted from the buffer pool according to the proposed submission amount.
In an embodiment of the present disclosure, based on the foregoing scheme, before the service invoker submits the task to the service provider according to the proposed submission amount, the method further includes: acquiring the minimum submission amount of the service calling party, and judging whether the proposed submission amount is smaller than the minimum submission amount; and when the recommended submission amount is smaller than the minimum submission amount, alarming.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for implementing data processing by invoking a service, the apparatus including:
a proposed commit amount determination module to: responding to a data sending request received from a service caller, determining the current load capacity of a service provider, and determining a proposed submission amount according to the current load capacity; a data sending module configured to: and sending the suggested submission amount to the service caller so that the service caller submits tasks to the service provider according to the suggested submission amount.
According to a third aspect of the embodiments of the present disclosure, there is provided a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for implementing data processing by invoking a service as described in any one of the above-mentioned technical solutions of the first aspect of the embodiments.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: one or more processors; a storage device, configured to store one or more programs, where when the one or more programs are executed by the one or more processors, the one or more processors implement the method for implementing data processing by invoking a service according to any one of the technical solutions of the first aspect of the embodiments.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in some embodiments of the present disclosure, upon receiving a data transmission request of a service caller, a current load capacity of the service provider is determined, and a proposed submission amount is determined according to the current load capacity. Further, the suggested submission amount is sent to the service caller, so that the service caller can adaptively submit the task to the service provider according to the suggested submission amount. Therefore, the technical scheme can dynamically sense the load capacity of the service provider, and the service caller can adapt to the change of the load capacity of the service provider according to the current load capacity of the service provider, thereby enhancing the safety and reliability of the system, saving manual operation and improving the utilization rate of service resources.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
FIG. 1 is a system architecture diagram illustrating a method for implementing data processing through invocation of services in an exemplary embodiment of the present disclosure;
FIG. 2 illustrates a flow diagram of a method of implementing data processing by invoking a service in accordance with an embodiment of the present disclosure;
FIG. 3 illustrates a schematic structural diagram of an architecture for implementing data processing by invoking a service according to an embodiment of the present disclosure;
FIG. 4 illustrates a flow diagram of a method of load capability awareness according to an embodiment of the present disclosure;
FIG. 5 illustrates Q- τ curves for service providers in different physical environments in accordance with an embodiment of the disclosure;
FIG. 6 illustrates a flow diagram of a method of determining a proposed commit volume according to one embodiment of the present disclosure;
FIG. 7 is a schematic structural diagram of an apparatus for implementing data processing by invoking a service according to an embodiment of the present disclosure;
FIG. 8 shows a schematic diagram of a structure of a computer storage medium in an exemplary embodiment of the disclosure; and the number of the first and second groups,
fig. 9 shows a schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
The present exemplary embodiment first provides a system architecture for implementing a method for implementing data processing by invoking a service, which can be applied to various data processing scenarios. Referring to fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send request instructions or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a photo processing application, a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 105 is a server that provides various services, and may serve as a service provider in the embodiment of the present disclosure, and the terminal devices 101, 102, and 103 may serve as service invokers in the embodiment of the present disclosure. Thus, in an exemplary embodiment, in response to receiving a data transmission request by a service caller, a current load capacity of the server 105 (service provider) is determined to determine a proposed commit volume based on the current load capacity (by way of example only). Further, the proposed submission amount is sent to the terminal device 101, 102, 103 (service invoker) so that the terminal device 101, 102, 103 (service invoker) submits the task to the server 105 (service provider) according to the proposed submission amount (for example only). Thus, the task submission amount is adaptively adjusted according to the current load capacity of the server 105, and finally the service invocation is realized.
In the related art, in the data interaction process between SOA-based systems, interface data formats are defined by two service parties (a service caller and a service provider) under the line, and each task is called once according to the data formats without considering the size of a data packet.
However, the technical solutions provided by the above related arts have the following disadvantages: 1) each task is called once, system interaction is frequent, and resource overhead is large; and 2), the size of the single-call data packet is not limited, and when the data volume is large, the performance of the system is easily reduced and even paralyzed.
In view of one or more of the above problems in the related art, the present technical solution provides a method and an apparatus for implementing data processing by invoking a service, a computer storage medium, and an electronic device, and aims to solve the problem of self-adaptation of invocation between services and submission amount (e.g., packet size) of an interactive task. The following description will first be made of an embodiment of a method for implementing data processing by calling a service:
FIG. 2 shows a flow diagram of a method of implementing data processing by invoking a service according to an embodiment of the present disclosure. The method for realizing data processing by calling service provided by the embodiment overcomes the above problems in the prior art at least to some extent. The execution main body of the method for implementing data processing by calling service provided by the embodiment may be a device with a calculation processing function, such as a server.
Referring to fig. 2, the method for implementing data processing by invoking a service according to this embodiment includes:
step S210, responding to the received data transmission request of the service caller, determining the current load capacity of the service provider, and determining the proposed submission amount according to the current load capacity; and the number of the first and second groups,
step S220, sending the proposed submission amount to the service caller, so that the service caller submits a task to the service provider according to the proposed submission amount.
In the technical solution provided by the embodiment shown in fig. 2, after receiving a data transmission request from a service caller, a proposed submission amount is determined according to the current load capacity of the service provider. Further, the service invoker submits tasks to the service provider adaptively according to the proposed submission amount. On one hand, the technical scheme can dynamically sense the load capacity of the service provider, so that the service caller can adapt to the change of the load capacity of the service provider according to the current load capacity of the service provider, the safety and reliability of the system are enhanced, manual operation is saved, and the utilization rate of service resources can be improved. On the other hand, under the condition that the utilization rate of service resources is improved, the interaction times among systems are reduced, and the resource overhead is saved.
In an exemplary embodiment, fig. 3 shows a structural schematic diagram of an architecture for implementing data processing by invoking a service according to an embodiment of the present disclosure, with reference to fig. 3:
the data processing method realized by calling the service based on the framework is as follows: when a service caller (e.g., a client) calls a service of a service provider, determining a current load capacity of the service provider through a service load capacity awareness model 31; further, the suggested submission amount of the tasks when the service is called next time is calculated according to the current load capacity; the proposed submission amount is then sent to the service invoker, which then effects the task submission through the task submission adaptive adjuster 32. Illustratively, the task submission adaptive adjuster 32 fetches a quantitative set of tasks from the task buffer pool 322 based on the proposed submission amount, and invokes services to complete the system interaction.
Details of the implementation of the steps of the embodiment shown in fig. 2 are set forth below in conjunction with fig. 3:
in an exemplary embodiment, fig. 4 shows a flow diagram of a load capability awareness method according to an embodiment of the present disclosure. Specifically, the present load capacity of the service provider may be determined in step S210. Referring to fig. 4, the embodiment shown in the figure includes step S410 and step S420.
In step 410, a predictive model is built about the proposed submission amount based on the relationship between the service response time and the task submission amount.
In an exemplary embodiment, for services in different physical environments, the following assumptions may be made:
(1) service providers in different physical environments have a consistent pattern with respect to the relationship between the task submission amount Q and the response time τ corresponding to the service, i.e., the relationship between Q and τ can be described by referring to the same expression.
(2) When the service load capacity of service providers in different physical environments tends to be saturated, the corresponding response time is basically stabilized at the same level; the response duration may be denoted as τmax. Wherein, taumaxIs the value at which the load capacity approaches the limit, and for safety, a relatively safe value, i.e. the safe response time, can be preset and recorded as tausafe=τmaxΩ, Ω is a buffer value set by the configuration manager 34.
(3) For a service provider under the same physical environment, the physical environment change amplitude is small and can be ignored between two continuous data sending requests.
Based on the above assumptions, the relationship between the task submission amount Q and the service response time τ with respect to the service provider (i.e., the above prediction model) can be obtained as shown in the following equation one and equation two:
Figure BDA0002264475810000081
Q=γ×τ+θ τ>τsafeformula two
In an exemplary embodiment, fig. 5 illustrates Q- τ curves for service providers (51,52,53,54) in different physical environments in accordance with an embodiment of the present disclosure.
Referring to FIG. 5, where τ ≦ τsafeThe part is described by a nonlinear function conforming to the distribution of the samples, such as the formula I; the second coefficient beta controls the transverse expansion of the graph, namely the change degree of the response time tau; the first coefficient α controls the vertical scaling of the graph, i.e., the degree of change in the task request amount Q. According to the point (2) in the premise hypothesis, the limits of the different physical environments correspond to response time lengths of similar levels, and the service providers (51,52,53,54) in the different physical environments can be considered to be consistent in horizontal expansion and contraction, that is, the second coefficient β has the same or similar value for the service providers (51,52,53,54) in the different physical environments.
Continuing with FIG. 5, where τ > τsafeThe part can be described by a linear function, such as the above formula two; the third coefficient γ (i.e. slope) may be represented by τ ═ τ in the above formula onesafeThe slope of (d) is determined. And because the patterns of the different physical environments Q-tau are assumed to be consistent, the third coefficients gamma of the service providers (51,52,53,54) in the different physical environments can be considered to be the same or similar.
In step 420, based on the predictive model, the current load capacity of the service provider is determined from the test data in the physical environment in which the service is located.
In an exemplary embodiment, test data about a service provider (e.g., 52 in FIG. 5) in a physical environment is obtained experimentally (where the response time of the test data is small such that the test response time is less than the safety response time τ)safeAnd thus may be applied to equation one); further, the test data is substituted into the above equation one to determine the second coefficient β value of the service provider 52 and τ thereofmax. Thereby determining the current load capacity τ of the service providermax
In an exemplary embodiment, the buffer value is based on a predetermined buffer value Ω, and is based on τsafe=τmax- Ω determining a safe response time, and further determining τ according to equation onesafeThe third coefficient γ in the formula two is obtained.
With continued reference to fig. 2, after determining the current load capacity of the service provider, in step S210, a proposed commit volume is also determined according to the current load capacity.
In an exemplary embodiment, fig. 6 shows a flowchart of a method for determining a proposed commit volume according to an embodiment of the present disclosure. Specifically, the method may be implemented as a specific embodiment of step S220. Referring to fig. 6, the embodiment shown in this figure comprises:
in step 610, determining a safety response time according to the current load capacity; and in step S620, determining a proposed commit volume according to the safety response time based on the predictive model.
In an exemplary embodiment, if the current data transmission request corresponds to the nth task submission amount, the model is predicted as τsafeCorresponding QnA sum value; the last service call is the task submission amount Q of the (n-1) th timen-1And a response time duration taun-1. Specifically, two specific embodiments regarding step S620 are as follows:
if the last service call corresponds to the reference response duration taun-1Less than or equal to the safety response time tausafeAnd then:
corresponding (tau) to last service calln-1,Qn-1) Substituting the formula I to obtain an actual value alpha of a first coefficient of a service provider under the physical environment; and, the actual value alpha of the first coefficient and the safe response time tau are measuredsafeSubstituting formula one to obtain the first proposed submission amount Qn1
If the last service call corresponds to the reference response duration taun-1Greater than the above-mentioned safety response time tausafeAnd then:
corresponding (tau) to last service calln-1,Qn-1) Substituting the formula II to obtain an actual value theta of a fourth coefficient of the service provider under the physical environment; and, the actual value theta of the fourth coefficient and the safe response time tau are setsafeSubstituting the formula II to obtain a second proposed submission amount Qn2
With continued reference to FIG. 2, after determining a proposed commit volume based on the current load capacity, in step S220, the proposed commit volume is sent to the service invoker to cause the service invoker to submit tasks to the service provider based on the proposed commit volume.
In an exemplary embodiment, referring to fig. 3, the task submission adaptive adjuster 32 specifically includes a task scheduler 321, a task buffer 322, and a task receiver 323. Specifically, after receiving the data generation task, the task receiver 323 stores the task (e.g., data packet) to be submitted to the service into the task cache pool 322. According to the technical scheme, the situation that the actual submission amount of the tasks is not matched with the task receiving amount is improved by introducing the task cache pool, so that the system performance is improved.
In an exemplary embodiment, after receiving the proposed submission amount, the service caller obtains the task to be submitted from the task buffer pool 322 according to the proposed submission amount, thereby smoothly implementing the service invocation.
In an exemplary embodiment, the architecture for implementing data processing by invoking a service further includes: the precaution device 33 is monitored. Before the service invoker submits the task to the service provider according to the proposed submission amount, the technical scheme further comprises: obtaining the minimum submission Q of the service callerminWhether the recommended commit volume is smaller than the minimum commit volume is determined by the monitoring precaution 33. And implements an alarm by monitoring the early-warning device 33 when the recommended submission amount is smaller than the minimum submission amount. Resource waste is avoided as much as possible through alarming, and data interaction efficiency is improved.
Illustratively, in one aspect, the monitoring precaution device 33 displays the task submission amount provided by the model each time an exception (e.g., the recommended submission amount is less than the minimum submission amount) is made, the exception is distinguished by a different color. On the other hand, the monitoring precaution 33 monitors the health of the task submission adaptive regulator 32 of the service caller. The monitoring and warning device 33 also notifies the relevant system personnel of the above abnormal situation (such as the recommended submission amount is smaller than the minimum submission amount) by means of short messages or mails.
In an exemplary embodiment, referring to fig. 3, the architecture for implementing data processing by invoking a service further includes: the configuration manager 34. The configuration manager 34 mainly provides a configuration entry for preset parameters, and in the configuration management, the following data items can be configured: safe buffer value omega, minimum task submission amount Q acceptable for service userminThe size of the task buffer pool, BufferPoolSize, and the task turn time interval tasktinterval, etc.
Those skilled in the art will appreciate that all or part of the steps for implementing the above embodiments are implemented as computer programs executed by processors, including a Central Processing Unit (CPU) and a Graphics Processing Unit (GPU). When the computer program is executed by a CPU or a GPU, the above-described functions defined by the above-described methods provided by the present disclosure are performed. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
The following introduces an embodiment of the apparatus for implementing data processing by invoking a service according to the present disclosure, which may be used to execute the method for implementing data processing by invoking a service provided in the foregoing embodiment of the present disclosure.
Fig. 7 shows a schematic structural diagram of an apparatus for implementing data processing by calling a service according to an embodiment of the present disclosure, and referring to fig. 7, an apparatus 700 for implementing data processing by calling a service provided in this embodiment includes: a proposed submission amount determination module 701 and a data transmission module 702.
The proposed submission amount determining module 701 is configured to: responding to a data sending request received from a service caller, determining the current load capacity of a service provider, and determining a proposed submission amount according to the current load capacity;
the data sending module 702 is configured to: and sending the suggested submission amount to the service caller so that the service caller submits tasks to the service provider according to the suggested submission amount.
In an embodiment of the present disclosure, based on the foregoing scheme, the aforementioned proposed submission amount determining module 701 includes: and a load capacity sensing submodule.
Wherein, the load ability perception submodule is configured to: constructing a prediction model about the suggested submission amount according to the relationship between the service response time and the task submission amount; and determining the current load capacity of the service provider according to the test data under the physical environment of the service based on the prediction model.
In an embodiment of the present disclosure, based on the foregoing scheme, the aforementioned proposed submission amount determining module 701 includes: a submission amount determination submodule.
Wherein, the submission amount determining submodule is configured to: determining the safety response time according to the current load capacity; and determining a proposed commit volume according to the safety response time based on the predictive model.
In an embodiment of the present disclosure, based on the foregoing solution, the relationship between the service response time and the task submission amount is as shown in the following formula one and formula two:
Figure BDA0002264475810000121
Q=γ×τ+θ τ>τsafeformula two
Wherein Q is the task submission amount and tau is aboveThe service response time, τsafeFor the above safe response time, α is a first coefficient, β is a second coefficient, γ is a third coefficient, and θ is a fourth coefficient.
In an embodiment of the disclosure, based on the foregoing scheme, the submission amount determining submodule is specifically configured to: if the reference response time length corresponding to the last service call is less than or equal to the safety response time, then:
substituting the reference response duration and the reference submission amount corresponding to the last service call into the formula I to obtain an actual value of the first coefficient; and substituting the actual value of the first coefficient and the safety response time into the formula I to obtain a first proposed submission amount.
In an embodiment of the disclosure, based on the foregoing scheme, the submission amount determining sub-module is further specifically configured to: if the reference response time length corresponding to the last service call is longer than the safety response time, then:
substituting the reference response duration and the reference submission amount corresponding to the last service call into the formula II to obtain an actual value of the fourth coefficient; and substituting the actual value of the fourth coefficient and the safety response time into the formula II to obtain a second proposed submission amount.
In an embodiment of the present disclosure, based on the foregoing scheme, the apparatus 700 for implementing data processing by invoking a service according to this embodiment further includes: and a task cache module.
Wherein, the task cache module is configured to: before a service caller submits tasks to the service provider according to the proposed submission amount, storing the tasks to be submitted to a cache pool of the service caller;
in this embodiment, the data sending module 702 is specifically configured to: and the service caller acquires the tasks to be submitted from the buffer pool according to the proposed submission amount.
In an embodiment of the present disclosure, based on the foregoing scheme, the apparatus 700 for implementing data processing by invoking a service according to this embodiment further includes: and a monitoring and early warning module.
Wherein, above-mentioned control early warning module is used for: before a service caller submits a task to the service provider according to the proposed submission amount, acquiring the minimum submission amount of the service caller, and judging whether the proposed submission amount is smaller than the minimum submission amount; and when the recommended submission amount is smaller than the minimum submission amount, alarming.
For details that are not disclosed in the embodiments of the apparatus for implementing data processing by calling a service in the present disclosure, please refer to the embodiments of the method for implementing data processing by calling a service in the present disclosure for details that are not disclosed in the embodiments of the apparatus for implementing data processing by calling a service in the present disclosure.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer storage medium capable of implementing the above method. On which a program product capable of implementing the above-described method of the present specification is stored. In some possible embodiments, various aspects of the present disclosure may also be implemented in the form of a program product including program code for causing a terminal device to perform the steps according to various exemplary embodiments of the present disclosure described in the "exemplary methods" section above of this specification when the program product is run on the terminal device.
Referring to fig. 8, a program product 800 for implementing the above method according to an embodiment of the present disclosure is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product described above may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, 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 disk Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of Network, including a Local Area Network (LAN) or Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present disclosure may be embodied as a system, method or program product. Accordingly, various aspects of the present disclosure may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 900 according to this embodiment of the disclosure is described below with reference to fig. 9. The electronic device 900 shown in fig. 9 is only an example and should not bring any limitations to the functionality or scope of use of the embodiments of the present disclosure.
As shown in fig. 9, the electronic device 900 is embodied in the form of a general purpose computing device. Components of electronic device 900 may include, but are not limited to: the at least one processing unit 910, the at least one memory unit 920, and a bus 930 that couples various system components including the memory unit 920 and the processing unit 910.
Wherein, the storage unit stores program codes, and the program codes can be executed by the processing unit 910, so that the processing unit 910 executes the steps according to various exemplary embodiments of the present disclosure described in the "exemplary method" section above in this specification. For example, the processing unit 910 described above may perform the following as shown in fig. 2: step S210, responding to the received data transmission request of the service caller, determining the current load capacity of the service provider, and determining the proposed submission amount according to the current load capacity; and step S220, sending the suggested submission amount to the service caller so that the service caller submits tasks to the service provider according to the suggested submission amount.
For example, the processing unit 910 may further execute a method for implementing data processing by calling a service as shown in any one of fig. 2 to 6.
Storage unit 920 may include readable media in the form of volatile storage units, such as: a Random Access Memory (RAM) 9201 and/or a cache Memory 9202, and may further include a Read-Only Memory (ROM) 9203.
Storage unit 920 may also include a program/utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 930 can be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 900 may also communicate with one or more external devices 1000 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 900, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 900 to communicate with one or more other computing devices. Such communication may be through an Input/Output (I/O) interface 950. Also, the electronic device 900 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public Network, such as the internet) via the Network adapter 970. As shown, the network adapter 960 communicates with the other modules of the electronic device 900 via the bus 930. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Furthermore, the above-described figures are merely schematic illustrations of processes included in methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (11)

1. A method for implementing data processing by invoking a service, the method comprising:
responding to a received data sending request of a service caller, determining the current load capacity of a service provider, and determining a proposed submission amount according to the current load capacity;
and sending the suggested submission amount to the service caller so that the service caller submits tasks to the service provider according to the suggested submission amount.
2. The method of claim 1, wherein determining the current load capacity of the service provider comprises:
constructing a prediction model about the suggested submission amount according to the relationship between the service response time and the task submission amount;
and determining the current load capacity of the service provider according to the test data of the physical environment in which the service is positioned based on the prediction model.
3. The method of claim 2, wherein determining a proposed commit amount based on the current load capacity comprises:
determining safety response time according to the current load capacity;
determining a proposed commit volume from the safe response time based on the predictive model.
4. The method of claim 2 or 3, wherein the relationship between the service response time and the task submission amount is as shown in the following formula one and formula two:
Figure FDA0002264475800000011
Q=γ×τ+θ τ>τsafeformula two
Wherein Q is the task submission amount, τ is the service response time, τsafeFor the safety response time, α is a first coefficient, β is a second coefficient, γ is a third coefficient, and θ is a fourth coefficient.
5. The method of claim 4, wherein determining a proposed commit volume from the safe response time based on the predictive model comprises:
if the reference response time length corresponding to the last service call is less than or equal to the safety response time, then:
substituting the reference response duration and the reference submission amount corresponding to the last service call into the formula I to obtain an actual value of the first coefficient; and substituting the actual value of the first coefficient and the safety response time into the formula I to obtain a first proposed submission amount.
6. The method of claim 4, wherein determining a proposed commit volume from the safe response time based on the predictive model comprises:
if the reference response time length corresponding to the last service call is longer than the safety response time, then:
substituting the reference response duration and the reference submission amount corresponding to the last service call into the formula II to obtain an actual value of the fourth coefficient; and substituting the actual value of the fourth coefficient and the safety response time into the formula II to obtain a second suggested submission amount.
7. The method of claim 4, wherein prior to the service invoker submitting a task to the service provider according to the proposed submission amount, the method further comprises:
storing the task to be submitted to a cache pool of the service calling party;
the service caller submits the task to the service provider according to the proposed submission amount, and the method comprises the following steps:
and the service calling party acquires the tasks to be submitted from the buffer pool according to the suggested submission amount.
8. The method of claim 7, wherein prior to the service invoker submitting a task to the service provider according to the proposed submission amount, the method further comprises:
acquiring the minimum submission amount of the service calling party, and judging whether the proposed submission amount is smaller than the minimum submission amount;
and when the suggested submission amount is smaller than the minimum submission amount, alarming.
9. An apparatus for implementing data processing by invoking a service, the apparatus comprising:
a proposed commit amount determination module to: responding to a received data sending request of a service caller, determining the current load capacity of a service provider, and determining a proposed submission amount according to the current load capacity;
a data sending module configured to: and sending the suggested submission amount to the service caller so that the service caller submits tasks to the service provider according to the suggested submission amount.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method of carrying out data processing by invoking a service according to any one of claims 1 to 8.
11. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method of implementing data processing by invoking a service as claimed in any one of claims 1 to 8.
CN201911082800.1A 2019-11-07 2019-11-07 Method, apparatus, medium, and device for implementing data processing by calling service Pending CN112783638A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911082800.1A CN112783638A (en) 2019-11-07 2019-11-07 Method, apparatus, medium, and device for implementing data processing by calling service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911082800.1A CN112783638A (en) 2019-11-07 2019-11-07 Method, apparatus, medium, and device for implementing data processing by calling service

Publications (1)

Publication Number Publication Date
CN112783638A true CN112783638A (en) 2021-05-11

Family

ID=75747947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911082800.1A Pending CN112783638A (en) 2019-11-07 2019-11-07 Method, apparatus, medium, and device for implementing data processing by calling service

Country Status (1)

Country Link
CN (1) CN112783638A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202765A (en) * 2007-12-19 2008-06-18 苏州大学 Method of service mesh grid dispatching based on history feedback
CN103379041A (en) * 2012-04-28 2013-10-30 国际商业机器公司 System detection method and device and flow control method and device
US20170005515A1 (en) * 2015-07-04 2017-01-05 Dean Sanders Renewable energy integrated storage and generation systems, apparatus, and methods with cloud distributed energy management services
CN108228347A (en) * 2017-12-21 2018-06-29 上海电机学院 The Docker self-adapting dispatching systems that a kind of task perceives
CN108845881A (en) * 2018-05-30 2018-11-20 有米科技股份有限公司 The method and device of server capacity dynamic adjustment
JP2019028538A (en) * 2017-07-26 2019-02-21 日本電信電話株式会社 Auto scale processing device, auto scale method and program
CN109976900A (en) * 2017-12-28 2019-07-05 北京京东尚科信息技术有限公司 The method and apparatus for calling service

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202765A (en) * 2007-12-19 2008-06-18 苏州大学 Method of service mesh grid dispatching based on history feedback
CN103379041A (en) * 2012-04-28 2013-10-30 国际商业机器公司 System detection method and device and flow control method and device
US20170005515A1 (en) * 2015-07-04 2017-01-05 Dean Sanders Renewable energy integrated storage and generation systems, apparatus, and methods with cloud distributed energy management services
JP2019028538A (en) * 2017-07-26 2019-02-21 日本電信電話株式会社 Auto scale processing device, auto scale method and program
CN108228347A (en) * 2017-12-21 2018-06-29 上海电机学院 The Docker self-adapting dispatching systems that a kind of task perceives
CN109976900A (en) * 2017-12-28 2019-07-05 北京京东尚科信息技术有限公司 The method and apparatus for calling service
CN108845881A (en) * 2018-05-30 2018-11-20 有米科技股份有限公司 The method and device of server capacity dynamic adjustment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
唐蓉君;叶波;文俊浩;: "面向服务环境中的NServiceBus服务总线应用研究", 计算机科学, no. 07 *
李国;申亚坤;李永华;曲文丽;: "一种面向多类型服务的动态负载均衡算法", 现代电子技术, no. 12 *

Similar Documents

Publication Publication Date Title
CN111258736B (en) Information processing method and device and electronic equipment
CN110445632B (en) Method and device for preventing client from crashing
CN110808914A (en) Access request processing method and device and electronic equipment
CN111858040A (en) Resource scheduling method and device
CN110795649A (en) Target page display method, device and system and electronic equipment
CN111611513B (en) Page display method and device based on user identity information and electronic equipment
CN113411400B (en) Information calling method and device, electronic equipment and readable storage medium
CN112395535A (en) Image lazy loading method and device, medium and electronic equipment
EP3723343B1 (en) Resource processing method and system, storage medium and electronic device
CN111966508A (en) Message batch sending method and device, computer equipment and storage medium
CN111949906A (en) Page display method and device and electronic equipment
CN112783638A (en) Method, apparatus, medium, and device for implementing data processing by calling service
CN111010453A (en) Service request processing method, system, electronic device and computer readable medium
CN109960905B (en) Information processing method, system, medium, and electronic device
CN115470432A (en) Page rendering method and device, electronic equipment and computer readable medium
CN114647499A (en) Asynchronous job task concurrency control method and device, electronic equipment and storage medium
CN115187364A (en) Method and device for monitoring deposit risk under bank distributed scene
CN114490126A (en) Page processing method and device, electronic equipment and storage medium
CN111580882B (en) Application program starting method, device, computer system and medium
CN114265692A (en) Service scheduling method, device, equipment and storage medium
CN109840073B (en) Method and device for realizing business process
CN114490050A (en) Data synchronization method and device
CN112328391A (en) Resource allocation method and device and electronic equipment
CN113010174A (en) Service monitoring method and device
CN111970338A (en) Request processing method and device based on cloud function and computer readable 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