CN112965836B - Service control method, device, electronic equipment and readable storage medium - Google Patents

Service control method, device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN112965836B
CN112965836B CN202110239219.7A CN202110239219A CN112965836B CN 112965836 B CN112965836 B CN 112965836B CN 202110239219 A CN202110239219 A CN 202110239219A CN 112965836 B CN112965836 B CN 112965836B
Authority
CN
China
Prior art keywords
service module
downstream
request
flow discharge
discharge information
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.)
Active
Application number
CN202110239219.7A
Other languages
Chinese (zh)
Other versions
CN112965836A (en
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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110239219.7A priority Critical patent/CN112965836B/en
Publication of CN112965836A publication Critical patent/CN112965836A/en
Application granted granted Critical
Publication of CN112965836B publication Critical patent/CN112965836B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/544Remote

Abstract

The disclosure discloses a service control method, a device, electronic equipment and a readable storage medium, relates to the technical field of computers, and particularly relates to the technical fields of cloud computing, cloud service, cloud storage and the like. The specific implementation scheme is as follows: acquiring a request initiated by an upstream service module to a downstream service module; judging whether the pre-stored flow discharge information comprises target flow discharge information matched with the downstream service module; when the pre-stored flow discharge information comprises target flow discharge information matched with the downstream service module, judging whether the target flow discharge information comprises information of the requested downstream interface or not; and when the target flow release information comprises information of the downstream interface of the request, the request is sent to a new service module corresponding to the downstream service module. According to the scheme in the disclosure, maintenance cost can be reduced.

Description

Service control method, device, electronic equipment and readable storage medium
Technical Field
The disclosure relates to the technical field of computers, in particular to the technical fields of cloud computing, cloud service, cloud storage and the like.
Background
In a distributed system, microservice is a mode of rapid development and wide application in the current service architecture direction, and splits an original huge single system into service modules with independent functions, wherein a plurality of dependency relations exist among the service modules. When the downstream service module needs to change the scheduling mode of the upstream service module due to the reconstruction or migration platform, an intermediate state from the access use to the complete access use exists before the reconstructed or migrated new service module accesses the request for formal use. In the intermediate state, in order to realize lossless migration or upgrading of the service, the new service module needs to be accessed to the request according to a certain proportion interface by interface to be used so as to discover in time when the new service module has problems, thereby reducing the loss caused by service migration or upgrading and the like as much as possible. Currently, in order to implement a new service module's interface-by-interface access request, code logic for controlling the interface discharge is typically added to the code of the upstream service module.
Disclosure of Invention
The disclosure provides a service control method, a service control device, an electronic device and a readable storage medium.
According to an aspect of the present disclosure, there is provided a service control method including:
acquiring a request initiated by an upstream service module to a downstream service module;
judging whether the pre-stored flow discharge information comprises target flow discharge information matched with the downstream service module;
when the pre-stored flow discharge information comprises target flow discharge information matched with the downstream service module, judging whether the target flow discharge information comprises information of the requested downstream interface or not;
And when the target flow release information comprises information of the downstream interface of the request, the request is sent to a new service module corresponding to the downstream service module.
According to another aspect of the present disclosure, there is provided a service control apparatus including:
the first acquisition module is used for acquiring a request initiated by the upstream service module to the downstream service module;
the first judging module is used for judging whether the pre-stored flow discharge information comprises target flow discharge information matched with the downstream service module;
The second judging module is used for judging whether the target flow discharge information comprises the information of the requested downstream interface or not when the pre-stored flow discharge information comprises the target flow discharge information matched with the downstream service module;
and the sending module is used for sending the request to a new service module corresponding to the downstream service module when the target flow discharge information comprises the information of the downstream interface of the request.
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 the method as described above.
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 as described above.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method as described above.
The technology solves the problem of high maintenance cost caused when the interface-by-interface access request of the new service module is realized at present, and reduces the maintenance cost.
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 drawings are included to provide a better understanding of the present application and are not to be construed as limiting the application. Wherein:
Fig. 1 is a flowchart of a service control method provided in an embodiment of the present disclosure;
FIG. 2 is a flow chart of a service control process in a specific embodiment of the present disclosure;
Fig. 3 is a block diagram of a service control apparatus for implementing a service control method of an embodiment of the present disclosure;
Fig. 4 is a block diagram of an electronic device used to implement a service control method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present application will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present application are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those 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 and spirit of the application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. "and/or" in the specification and claims means at least one of the connected objects.
Cloud services (clouds) are an increasing, usage and interaction pattern of related internet-based services, typically involving providing dynamically extensible and often virtualized resources over the internet. The cloud is a metaphor for networks and the internet. Cloud services generally refer to obtaining a desired service in an on-demand, scalable manner over a network. Such services may be IT, software, internet related, or other services.
Cloud storage (cloud storage) is a mode of online storage, i.e., storing data on multiple virtual servers, typically hosted by third parties, rather than on dedicated servers. The concept of cloud storage is similar to cloud computing. Cloud computing (clouding) refers to a technical architecture that allows access to a shared physical or virtual resource pool that is elastically extensible through a network, where resources may include servers, operating systems, networks, software, applications, storage devices, etc., and may be deployed and managed in an on-demand, self-service manner. Through cloud computing technology, high-efficiency and powerful data processing capability can be provided for technical application such as artificial intelligence and blockchain, and model training.
The embodiment of the application can be applied to an Internet large-scale distributed system, and the applicable scene is to access requests according to a certain proportion from interface to interface before the access requests are formally used for new service modules configured by reconfiguration upgrading or migration platforms and the like, so that the service modules can be found out in time when problems occur in the new service modules, and the loss caused by service migration or upgrading and the like is reduced as much as possible.
Referring to fig. 1, fig. 1 is a flowchart of a service control method according to an embodiment of the present disclosure, where the method is applied to an electronic device, for example, a base layer between an upstream service module and a downstream service module, and is used to forward a request sent by the upstream service module to the downstream service module. As shown in fig. 1, the method comprises the steps of:
step 11: and acquiring a request initiated by the upstream service module to the downstream service module.
In this embodiment, the request may be selected as a scheduling request, for example, a remote procedure call (Remote Procedure Call, RPC) request. The upstream and downstream service modules may be service modules in a remote dictionary service (Remote Dictionary Server, redis) based distributed system.
Step 12: and judging whether the pre-stored flow discharge information comprises target flow discharge information matched with a downstream service module.
It should be noted that in the embodiment of the present application, the downstream service module may correspond to the new service module and the new service module. The new service module is a service module obtained on the basis of the original service module due to service migration or upgrading and other reasons. For example, assuming an original service module has 10 interfaces, when one or more of the 10 interfaces are upgraded or the platform is migrated, the one or more interfaces constitute a new service module, but the original service module remains unchanged.
For the pre-stored traffic volume information, the pre-stored traffic volume information may be used to indicate whether to send a request of a corresponding downstream service module to a new service module corresponding to the downstream service module, so as to implement lossless migration or upgrade of the service, and so on.
Step 13: when the pre-stored traffic volume information comprises target traffic volume information matched with the downstream service module, judging whether the target traffic volume information comprises information of a requested downstream interface.
It can be appreciated that when the target traffic volume information includes information of the downstream interface of the corresponding request, the request may be indicated to be sent to the new service module corresponding to the downstream service module. Otherwise, when the target traffic volume information does not include the information of the downstream interface of the corresponding request, the request is sent to the original service module corresponding to the downstream service module, namely normal request sending is executed.
In one embodiment, the information of the downstream interface may include, but is not limited to, an identification of the downstream interface, a scale value of the downstream interface, and the like.
Step 14: and when the target flow volume information comprises the information of the requested downstream interface, sending the request to a new service module corresponding to the downstream service module.
In the embodiment of the application, after a request initiated by an upstream service module to a downstream service module is acquired, whether the pre-stored traffic volume information comprises target traffic volume information matched with the downstream service module or not can be judged, when the pre-stored traffic volume information comprises the target traffic volume information matched with the downstream service module, whether the target traffic volume information comprises information of a requested downstream interface or not is judged, and when the target traffic volume information comprises information of the requested downstream interface, the request is sent to a new service module corresponding to the downstream service module. Therefore, in the scene of realizing the interface-by-interface access request of the new service module, the interface-by-interface access request of the new service module can be realized based on the pre-stored traffic discharge information, so that the interface-by-interface access request of the new service module is realized without modifying the code logic of the upstream service module, and the maintenance cost is reduced; furthermore, unnecessary online changes to the upstream service module caused by upgrading or transferring the downstream service module can be effectively reduced, and risks caused by online configuration are reduced.
Furthermore, for the upstream service module, the scheme of the application only needs to rely on the electronic equipment such as a base layer between the upstream service module and the downstream service module, the changing cost is almost 0, the control of the discharge logic is almost insensitive to the upstream service module, and when the discharge proportion of the interface is adjusted, the discharge information of the flow is only needed to be modified, and the operation of re-online and the like on the upstream service module is not needed, thereby saving resources such as a server and the like.
Optionally, after performing step 11, and before performing step 12, the electronic device may determine whether the downstream service module is currently enabled with the low traffic policy. The small flow policy may be understood as interface-by-interface access to the new service module corresponding to the configured downstream service module. If the low-traffic policy is not started currently, the access is normally performed, namely, the request is directly sent to the downstream service module. If the low traffic policy is currently enabled, step 12 is further performed.
Optionally, as shown in fig. 1, the service control method in this embodiment further includes the following steps:
Step 15: when the pre-stored flow discharge information does not comprise target flow discharge information matched with the downstream service module, a request initiated to the downstream service module is sent to an original service module corresponding to the downstream service module; or when the pre-stored traffic volume information comprises target traffic volume information matched with the downstream service module, but the target traffic volume information does not comprise information of a downstream interface of a request initiated to the downstream service module, the request is sent to an original service module corresponding to the downstream service module. In this way, it can be ensured that requests by upstream service modules to downstream service modules are performed.
In the embodiment of the application, in order to realize the interface-by-interface access request of the new service module, a server for controlling the small flow discharge proportion, such as a redis-based server, can be deployed, corresponding flow discharge information is stored in the server, and the electronic equipment periodically accesses the server to acquire the pre-stored flow discharge information from the server. The above-described small traffic volume discharge ratio can be understood as a partial request volume discharge ratio.
Optionally, the service control method in this embodiment may further include: and acquiring pre-stored traffic discharge information from a server. For example, pre-stored traffic volume information may be periodically pulled from the server. Therefore, by means of the deployment server, when the interface discharge proportion is changed or a module interface is newly added, the corresponding flow discharge information is only required to be added or modified in the server, and the upstream service module or the current service module is not required to be changed and on line again, so that the maintenance cost is reduced; and the flow discharge information pulled from the server can be stored in the memory, so that the processing speed is high, and excessive time consumption is not increased.
In one embodiment, the format of the traffic volume information in this embodiment may be: < service name: interface identification: proportional value ], [ interface identification: proportional value ], … >. The service name is the identification of the downstream service module matched with the traffic volume information and is used for indicating the downstream service module matched with the traffic volume information. The scale value can be understood as a traffic discharge scale value of the interface corresponding to the corresponding interface identifier. The interface identification and the scaling value are used to indicate which interface or interfaces of the corresponding downstream service module requests are sent to the new service module with a scaling value.
Optionally, when the information of the downstream interface includes the scale value, the process of sending the request to the new service module corresponding to the downstream service module may include: judging whether the discharge proportional value is larger than a randomly generated proportional value or not; and when the discharge proportional value is larger than the randomly generated proportional value, sending the request to a new service module corresponding to the downstream service module. And if the discharge proportional value is smaller than or equal to the randomly generated proportional value, sending the request to the original service module corresponding to the downstream service module. In this way, by means of comparing the discharge proportional value with the proportional value generated randomly, the discharge proportional value in the flow discharge information can be controlled, and then the flow discharge information can be modified in an auxiliary manner during upgrading or migration service.
The above method for randomly generating the ratio value may be a linear congruential method, where the formula is RandSeed = (a. RandSeed +b)% M. Wherein A is a multiplier, B is an increment, M is a modulus, A, B and M are constants. An initial value is selected RandSeed and then the next random number is calculated. Typically the initial value is chosen to be the current timestamp such that the value is independent of the value of the previous generation at each generation.
For example, referring to fig. 2, the service control procedure in this embodiment may include:
s1: the basic library periodically pulls pre-stored flow release information from the server;
s2: the base library acquires an RPC request initiated by an upstream service module to a downstream service module;
S3: the base library judges whether the pre-stored flow discharge information comprises target flow discharge information matched with the downstream service module.
S4: and if the target traffic discharge information is not included, sending the RPC request to an original service module corresponding to the downstream service module.
S5: if the target flow discharge information is judged to be included, judging whether the target flow discharge information includes information of a requested downstream interface or not.
S6: further, if the information of the downstream interface of the request is not included, the RPC request is sent to the original service module corresponding to the downstream service module.
S7: and if the information corresponding to the downstream interface is judged to be included, the RPC request is sent to a new service module corresponding to the downstream service module.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a service control device according to an embodiment of the disclosure, and as shown in fig. 3, the service control device 30 includes:
a first obtaining module 31, configured to obtain a request initiated by an upstream service module to a downstream service module;
a first judging module 32, configured to judge whether the pre-stored traffic volume information includes target traffic volume information matched with the downstream service module;
A second judging module 33, configured to judge, when the pre-stored traffic volume information includes target traffic volume information matched with the downstream service module, whether the target traffic volume information includes information of the requested downstream interface;
And the sending module 34 is configured to send the request to a new service module corresponding to the downstream service module when the target traffic volume information includes information of the requested downstream interface.
Optionally, the sending module 34 is further configured to:
When the pre-stored flow discharge information does not comprise target flow discharge information matched with the downstream service module, the request is sent to an original service module corresponding to the downstream service module;
Or when the pre-stored traffic volume information comprises target traffic volume information matched with the downstream service module, but the target traffic volume information does not comprise information of a downstream interface of the request, sending the request to an original service module corresponding to the downstream service module.
Optionally, the service control device 30 further includes:
and the second acquisition module is used for acquiring the pre-stored flow discharge information from the server.
Optionally, the information of the requested downstream interface includes a discharge ratio value of the downstream interface; the transmitting module 34 includes:
The judging unit is used for judging whether the discharge proportional value is larger than a randomly generated proportional value or not;
And the sending unit is used for sending the request to a new service module corresponding to the downstream service module when the discharge proportional value is larger than the randomly generated proportional value.
It can be appreciated that the service control device 30 in the embodiment of the present disclosure may implement each process implemented in the embodiment of the method shown in fig. 1 and achieve the same beneficial effects, and in order to avoid repetition, a detailed description is omitted here.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 4 shows a schematic block diagram of an example electronic device 400 that may be used to implement an embodiment of the application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate 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 applications described and/or claimed herein.
As shown in fig. 4, the apparatus 400 includes a computing unit 401 that can perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 402 or a computer program loaded from a storage unit 408 into a Random Access Memory (RAM) 403. In RAM 403, various programs and data required for the operation of device 400 may also be stored. The computing unit 401, ROM 402, and RAM 403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Various components in device 400 are connected to I/O interface 405, including: an input unit 406 such as a keyboard, a mouse, etc.; an output unit 407 such as various types of displays, speakers, and the like; a storage unit 408, such as a magnetic disk, optical disk, etc.; and a communication unit 409 such as a network card, modem, wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 401 may be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 401 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 401 performs the respective methods and processes described above, such as a service control method. For example, in some embodiments, the service control method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 400 via the ROM 402 and/or the communication unit 409. When the computer program is loaded into RAM 403 and executed by computing unit 401, one or more steps of the service control method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the service control method 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), load 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), the internet, and blockchain networks.
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 can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual PRIVATE SERVER" or simply called "VPS"). The server may also be a server of a distributed system or a server that incorporates 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 or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (10)

1. A service control method, comprising:
acquiring a request initiated by an upstream service module to a downstream service module;
judging whether the pre-stored flow discharge information comprises target flow discharge information matched with the downstream service module;
when the pre-stored flow discharge information comprises target flow discharge information matched with the downstream service module, judging whether the target flow discharge information comprises information of the requested downstream interface or not;
When the target flow release information comprises information of a downstream interface of the request, the request is sent to a new service module corresponding to the downstream service module;
and the information of the requested downstream interface comprises a discharge proportional value of the downstream interface.
2. The method of claim 1, further comprising:
When the pre-stored flow discharge information does not comprise target flow discharge information matched with the downstream service module, the request is sent to an original service module corresponding to the downstream service module;
Or alternatively
And when the pre-stored flow discharge information comprises target flow discharge information matched with the downstream service module, but the target flow discharge information does not comprise information of a downstream interface of the request, sending the request to an original service module corresponding to the downstream service module.
3. The method of claim 1, further comprising:
and acquiring the pre-stored traffic discharge information from a server.
4. The method of claim 1, the sending the request to a new service module corresponding to the downstream service module, comprising:
judging whether the discharge proportional value is larger than a randomly generated proportional value or not;
And when the discharge proportional value is larger than the randomly generated proportional value, the request is sent to a new service module corresponding to the downstream service module.
5. A service control apparatus comprising:
the first acquisition module is used for acquiring a request initiated by the upstream service module to the downstream service module;
the first judging module is used for judging whether the pre-stored flow discharge information comprises target flow discharge information matched with the downstream service module;
The second judging module is used for judging whether the target flow discharge information comprises the information of the requested downstream interface or not when the pre-stored flow discharge information comprises the target flow discharge information matched with the downstream service module;
the sending module is used for sending the request to a new service module corresponding to the downstream service module when the target flow discharge information comprises the information of the downstream interface of the request;
and the information of the requested downstream interface comprises a discharge proportional value of the downstream interface.
6. The apparatus of claim 5, wherein the means for transmitting is further configured to:
When the pre-stored flow discharge information does not comprise target flow discharge information matched with the downstream service module, the request is sent to an original service module corresponding to the downstream service module;
Or alternatively
And when the pre-stored flow discharge information comprises target flow discharge information matched with the downstream service module, but the target flow discharge information does not comprise information of a downstream interface of the request, sending the request to an original service module corresponding to the downstream service module.
7. The apparatus of claim 5, further comprising:
and the second acquisition module is used for acquiring the pre-stored flow discharge information from the server.
8. The apparatus of claim 5, the transmitting module comprising:
The judging unit is used for judging whether the discharge proportional value is larger than a randomly generated proportional value or not;
And the sending unit is used for sending the request to a new service module corresponding to the downstream service module when the discharge proportional value is larger than the randomly generated proportional value.
9. An electronic device, comprising:
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 the method of any one of claims 1-4.
10. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-4.
CN202110239219.7A 2021-03-04 2021-03-04 Service control method, device, electronic equipment and readable storage medium Active CN112965836B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110239219.7A CN112965836B (en) 2021-03-04 2021-03-04 Service control method, device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110239219.7A CN112965836B (en) 2021-03-04 2021-03-04 Service control method, device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112965836A CN112965836A (en) 2021-06-15
CN112965836B true CN112965836B (en) 2024-04-23

Family

ID=76276360

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110239219.7A Active CN112965836B (en) 2021-03-04 2021-03-04 Service control method, device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112965836B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114221906A (en) * 2021-11-11 2022-03-22 百度在线网络技术(北京)有限公司 Flow control method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8260893B1 (en) * 2004-07-06 2012-09-04 Symantec Operating Corporation Method and system for automated management of information technology
WO2016177156A1 (en) * 2015-07-16 2016-11-10 中兴通讯股份有限公司 Traffic processing method, device and system
CN109327353A (en) * 2018-09-29 2019-02-12 阿里巴巴集团控股有限公司 Service traffics determine method, apparatus and electronic equipment
CN109412957A (en) * 2017-08-17 2019-03-01 阿里巴巴集团控股有限公司 Traffic scheduling method, device and system and electronic equipment
CN110071952A (en) * 2018-01-24 2019-07-30 北京京东尚科信息技术有限公司 The control method and device of service call amount
CN111356103A (en) * 2018-12-21 2020-06-30 中国移动通信集团山西有限公司 Flow quota distribution method and device, server and computer storage medium
CN111694889A (en) * 2020-06-12 2020-09-22 百度在线网络技术(北京)有限公司 Data processing method and device, electronic equipment and readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8260893B1 (en) * 2004-07-06 2012-09-04 Symantec Operating Corporation Method and system for automated management of information technology
WO2016177156A1 (en) * 2015-07-16 2016-11-10 中兴通讯股份有限公司 Traffic processing method, device and system
CN109412957A (en) * 2017-08-17 2019-03-01 阿里巴巴集团控股有限公司 Traffic scheduling method, device and system and electronic equipment
CN110071952A (en) * 2018-01-24 2019-07-30 北京京东尚科信息技术有限公司 The control method and device of service call amount
CN109327353A (en) * 2018-09-29 2019-02-12 阿里巴巴集团控股有限公司 Service traffics determine method, apparatus and electronic equipment
CN111356103A (en) * 2018-12-21 2020-06-30 中国移动通信集团山西有限公司 Flow quota distribution method and device, server and computer storage medium
CN111694889A (en) * 2020-06-12 2020-09-22 百度在线网络技术(北京)有限公司 Data processing method and device, electronic equipment and readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于DNS的网络多出口流量调度方法;翁源;黄小红;李丹丹;赵泽华;;东南大学学报(自然科学版);20171120(第S1期);全文 *
基于时延特性建模的多断面短时交通流预测;刘小明;田玉林;唐少虎;尚春琳;魏路;;交通运输系统工程与信息;20200615(第03期);全文 *

Also Published As

Publication number Publication date
CN112965836A (en) 2021-06-15

Similar Documents

Publication Publication Date Title
CN112540806B (en) Method and device for rendering small program page, electronic equipment and storage medium
WO2023109138A1 (en) Method and apparatus for starting android application in linux system, and electronic device
JP2022003507A (en) Stress test method and device, electronic apparatus, computer-readable storage medium, and computer program
CN114816393B (en) Information generation method, device, equipment and storage medium
CN114035863A (en) Method, device and equipment for operating android application in Linux system
CN112965836B (en) Service control method, device, electronic equipment and readable storage medium
CN112671892B (en) Data transmission method, device, electronic equipment and medium
CN114490048A (en) Task execution method and device, electronic equipment and computer storage medium
CN115514718B (en) Data interaction method, control layer and equipment based on data transmission system
CN111767149A (en) Scheduling method, device, equipment and storage equipment
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN113535020B (en) Method, apparatus, device, medium and product for generating application icons
CN114374703A (en) Method, device and equipment for acquiring cloud mobile phone information and storage medium
CN113419865A (en) Cloud resource processing method, related device and computer program product
CN113568706A (en) Container adjusting method and device for service, electronic equipment and storage medium
CN114157917B (en) Video editing method and device and terminal equipment
CN114116487B (en) Pressure testing method and device, electronic equipment and storage medium
CN114428646B (en) Data processing method and device, electronic equipment and storage medium
CN112506582B (en) Method, device, equipment and medium for processing small program data packet
CN117407111A (en) Method and device for starting graphic display service, electronic equipment and storage medium
CN114416040A (en) Page construction method, device, equipment and storage medium
CN116756061A (en) External equipment adaptation method, device, equipment and storage medium
CN117193857A (en) Output signal generation method, device, equipment and storage medium
CN115878296A (en) Resource management method and device, electronic equipment and readable storage medium
CN116954922A (en) Distributed storage method, device, equipment and 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
GR01 Patent grant