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

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

Info

Publication number
CN112965836A
CN112965836A CN202110239219.7A CN202110239219A CN112965836A CN 112965836 A CN112965836 A CN 112965836A CN 202110239219 A CN202110239219 A CN 202110239219A CN 112965836 A CN112965836 A CN 112965836A
Authority
CN
China
Prior art keywords
service module
downstream
request
information
sending
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.)
Granted
Application number
CN202110239219.7A
Other languages
Chinese (zh)
Other versions
CN112965836B (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

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/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure discloses a service control method and device, electronic equipment and a readable storage medium, and relates to the technical field of computers, in particular 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 pre-stored flow discharge information comprises target flow discharge information matched with the downstream service module; when the prestored flow release information comprises target flow release information matched with the downstream service module, judging whether the target flow release information comprises the information of the requested downstream interface; and when the target flow discharge information comprises the information of the downstream interface of the request, sending the request to a new service module corresponding to the downstream service module. According to the scheme in the disclosure, the maintenance cost can be reduced.

Description

Service control method and device, electronic equipment and readable storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of cloud computing, cloud services, cloud storage, and the like.
Background
In a distributed system, micro-servization is a mode which is rapidly developed and widely applied in the direction of the current service architecture, the micro-servization divides an original huge single system into service modules with independent functions, and a plurality of dependency relationships exist among a plurality of service modules. When a downstream service module needs to change a scheduling mode of the upstream service module due to reasons such as reconfiguration or platform migration, an intermediate state from starting access use to full access use exists before a new reconfigured or migrated service module requests formal use. In this intermediate state, in order to implement lossless migration or upgrade of the service, the new service module needs to access the request to start using according to a certain proportion interface by interface, so as to find out in time when the new service module has a problem, and reduce the loss caused by service migration or upgrade as much as possible. Currently, to implement interface-by-interface access requests for new service modules, code logic that controls interface relief 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 pre-stored flow discharge information comprises target flow discharge information matched with the downstream service module;
when the prestored flow release information comprises target flow release information matched with the downstream service module, judging whether the target flow release information comprises the information of the requested downstream interface;
and when the target flow discharge information comprises the information of the downstream interface of the request, sending the request 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 judgment module is used for judging whether the prestored flow discharge information comprises target flow discharge information matched with the downstream service module;
a second determining module, configured to determine whether the target traffic release information includes information of the requested downstream interface when the pre-stored traffic release information includes target traffic release 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 requested downstream interface.
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 having stored thereon computer instructions for causing the computer to perform the method as described above.
According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method as described above.
According to the technology of the application, the problem of high maintenance cost caused by realization of the interface-by-interface access request of the new service module at present is solved, and the maintenance cost is reduced.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
fig. 1 is a flowchart of a service control method provided by 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 for implementing a service control method of an embodiment of the present disclosure.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. 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 present 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 of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be practiced in sequences other than those illustrated or 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. In the description and in the claims "and/or" means at least one of the connected objects.
Cloud services (cloud services) are an augmentation, usage, and interaction model of internet-based related services that typically involve providing dynamically extensible and often virtualized resources over the internet. Cloud is a metaphor of network and internet. Cloud services generally refer to obtaining desired services over a network in an on-demand, easily extensible manner. Such services may be IT and software, internet related, or other services.
Cloud storage (cloud storage) is a mode of online storage, i.e., data is stored on multiple virtual servers, usually hosted by third parties, rather than on dedicated servers. The concept of cloud storage is similar to cloud computing. Cloud computing (cloud computing) refers to a technology architecture that accesses a flexibly extensible shared physical or virtual resource pool through a network, where the resources may include servers, operating systems, networks, software, applications, storage devices, and the like, and may be deployed and managed in an on-demand, self-service manner. Through the cloud computing technology, high-efficiency and strong data processing capacity can be provided for technical application and model training of artificial intelligence, block chains and the like.
The embodiment of the application can be applied to an internet large-scale distributed system, and the applicable scene is that the request is accessed interface by interface according to a certain proportion before the new service module configured by reconstruction upgrading or migration platform is formally used, so that the problem of the new service module can be timely found out, and the loss caused by service migration or upgrading and the like can be reduced as much as possible.
Referring to fig. 1, fig. 1 is a flowchart of a service control method provided by an embodiment of the present disclosure, and the method is applied to an electronic device, such as a base layer between an upstream service module and a downstream service module, for forwarding a request issued 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 a scheduling request, for example, a Remote Procedure Call (RPC) request. The upstream service module and the downstream service module may be service modules in a Remote Dictionary service (Redis) based distributed system.
Step 12: and judging whether the prestored flow discharge information comprises target flow discharge information matched with the downstream service module.
It should be noted that, in the embodiment of the present application, the downstream service module may correspond to the original 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 the like. For example, assuming that the original service module has 10 interfaces, when one or more of the 10 interfaces is upgraded or migrated to the platform, the one or more interfaces constitute a new service module, but the original service module remains unchanged.
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 a service.
Step 13: and when the prestored flow play information comprises target flow play information matched with the downstream service module, judging whether the target flow play information comprises the requested downstream interface information.
Understandably, when the target traffic volume information includes information of a downstream interface corresponding to the request, the target traffic volume information may indicate that the request is sent to a 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 corresponding to the request, the request is sent to the original service module corresponding to the downstream service module, that is, normal request sending is executed.
In one embodiment, the information of the downstream interface may include, but is not limited to, an identifier of the downstream interface, a scaling value of the downstream interface, and the like.
Step 14: and when the target flow discharge information comprises the requested information of the downstream interface, sending the request to a new service module corresponding to the downstream service module.
In this embodiment of the application, after a request initiated by an upstream service module to a downstream service module is obtained, it may be determined whether pre-stored traffic volume information includes target traffic volume information matched with the downstream service module, and when the pre-stored traffic volume information includes the target traffic volume information matched with the downstream service module, it may be determined whether the target traffic volume information includes information of a requested downstream interface, and when the target traffic volume information includes the information of the requested downstream interface, the request may be sent to a new service module corresponding to the downstream service module. Therefore, under 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 prestored flow 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 modification of 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 in the application only needs to rely on the electronic equipment between the upstream service module and the downstream service module, such as a basic layer, the change cost is almost 0, the control of the release logic is almost insensitive to the upstream service module, the release proportion of the interface is adjusted only by modifying the flow release information, the upstream service module does not need to be re-on-line and the like, and therefore resources such as a server and the like are saved.
Optionally, after performing step 11 and before performing step 12, the electronic device may determine whether the downstream service module currently enables the low-traffic policy. The low-traffic policy can be understood as interface-by-interface access to a new service module corresponding to the configured downstream service module. If the small-flow strategy is not started currently, the access is normally carried out, 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 prestored flow release information does not include target flow release information matched with the downstream service module, sending a request initiated to the downstream service module to an original service module corresponding to the downstream service module; or, when the pre-stored traffic volume information includes target traffic volume information matched with the downstream service module but the target traffic volume information does not include information of a downstream interface of the request initiated by the downstream service module, sending the request to the original service module corresponding to the downstream service module. In this way, requests by upstream service modules to downstream service modules can be guaranteed to be executed.
In this embodiment of the application, in order to implement an interface-by-interface access request of a new service module, a server for controlling a small traffic volume proportion, such as a redis-based server, may be deployed, and store corresponding traffic volume information in the server, and the electronic device periodically accesses the server to obtain pre-stored traffic volume information from the server. The above-mentioned small flow rate play-out ratio may be understood as a partial request play-out ratio.
Optionally, the service control method in this embodiment may further include: and acquiring prestored flow discharge information from the server. For example, pre-stored traffic volume information may be pulled from the server periodically. Therefore, by means of the deployment server, when the interface release proportion is changed or a module interface is newly added, only corresponding flow release information needs to be added or modified in the server, and an upstream service module or a current service module does not need to be changed and re-on-line, so that the maintenance cost is reduced; and the flow volume information pulled from the server can be stored in the memory, 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: ratio value ], [ interface identification: ratio value ], … >. The service name is the identifier of the downstream service module matched with the flow discharge information, and is used for indicating the downstream service module matched with the flow discharge information. The proportional value can be understood as a flow scaling value of the interface corresponding to the corresponding interface identifier. The interface identifier and the ratio value are used to indicate which interface or interfaces of the corresponding downstream service module request to send to the new service module with a certain ratio value.
Optionally, when the information of the downstream interface includes the play scale value, the sending the request to the new service module corresponding to the downstream service module may include: judging whether the release proportion value is larger than a randomly generated proportion value or not; and when the release proportion value is larger than the randomly generated proportion value, sending the request to a new service module corresponding to the downstream service module. And if the release quantity 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 comparing the proportional value with the randomly generated proportional value, the proportional value in the traffic information can be controlled, and the traffic information can be modified in an auxiliary manner when the service is upgraded or migrated.
The method for randomly generating the ratio value may be a linear congruence method, and the formula is (a × RandSeed + B)% M. Where A is a multiplier, B is an increment, M is a modulus, A, B and M are both constants. An initial value (RandSeed) is selected and then the next random number is calculated. Typically the initial value is chosen to be the current timestamp so that the value is generated each time it is not dependent on the value previously generated.
For example, referring to fig. 2, the service control procedure in this embodiment may include:
s1: the basic library periodically pulls prestored flow discharge information from the server;
s2: the method comprises the steps that a basic library acquires an RPC request initiated by an upstream service module to a downstream service module;
s3: and the basic library judges whether the prestored flow discharge information comprises target flow discharge information matched with the downstream service module.
S4: and if the target flow discharge information is not included, the RPC request is sent to an original service module corresponding to the downstream service module.
S5: and if the target flow release information is judged to be included, judging whether the target flow release information includes the requested information of the downstream interface.
S6: further, if the information of the downstream interface not including the request is judged, the RPC request is sent to the original service module corresponding to the downstream service module.
S7: and if the information of the corresponding 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 apparatus according to an embodiment of the present disclosure, and as shown in fig. 3, the service control apparatus 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 pre-stored traffic volume information includes target traffic volume information matched with the downstream service module;
a second determining module 33, configured to determine whether the target traffic volume information includes information of the requested downstream interface when the pre-stored traffic volume information includes target traffic volume information matched with the downstream service module;
a sending module 34, 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, sending the request to an original service module corresponding to the downstream service module;
or, when the pre-stored traffic volume information includes target traffic volume information matched with the downstream service module but the target traffic volume information does not include information of the 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 prestored flow discharge information from the server.
Optionally, the information of the requested downstream interface includes a release ratio value of the downstream interface; the sending module 34 includes:
the judging unit is used for judging whether the release proportion value is larger than a randomly generated proportion 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 putting proportion value is larger than the randomly generated proportion value.
It can be understood that the service control apparatus 30 according to the embodiment of the present disclosure may implement each process implemented in the method embodiment shown in fig. 1 and achieve the same beneficial effects, and for avoiding repetition, details are not described here again.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 4 shows a schematic block diagram of an example electronic device 400 that may be used to implement embodiments of the present 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 phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 4, the apparatus 400 includes a computing unit 401 that can perform various appropriate 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 the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
A number of components in device 400 are connected to I/O interface 405, including: an input unit 406 such as a keyboard, a mouse, or the like; 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, or the like; 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.
Computing unit 401 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 401 executes the respective methods and processes described above, such as the service control method. For example, in some embodiments, the service control method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as 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 circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a 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 that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes 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 codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. 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. A 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 a pointing device (e.g., a mouse or a 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 can 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, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end 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 back-end, 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 clients and servers. A client and server are generally 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 a traditional physical host and a VPS service (Virtual Private Server, or VPS for short). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (11)

1. A service control method, comprising:
acquiring a request initiated by an upstream service module to a downstream service module;
judging whether pre-stored flow discharge information comprises target flow discharge information matched with the downstream service module;
when the prestored flow release information comprises target flow release information matched with the downstream service module, judging whether the target flow release information comprises the information of the requested downstream interface;
and when the target flow discharge information comprises the information of the downstream interface of the request, sending the request to a new service module corresponding to the downstream service module.
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, sending the request to an original service module corresponding to the downstream service module;
or,
and when the pre-stored flow release information comprises target flow release information matched with the downstream service module but does not comprise the information of the downstream interface of the request, sending the request to the original service module corresponding to the downstream service module.
3. The method of claim 1, further comprising:
and acquiring the prestored flow discharge information from the server.
4. The method of claim 1, wherein the information of the requested downstream interface includes a scalar value of the downstream interface; the sending the request to a new service module corresponding to the downstream service module includes:
judging whether the release proportion value is larger than a randomly generated proportion value or not;
and when the release proportion value is larger than the randomly generated proportion value, sending the request 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 judgment module is used for judging whether the prestored flow discharge information comprises target flow discharge information matched with the downstream service module;
a second determining module, configured to determine whether the target traffic release information includes information of the requested downstream interface when the pre-stored traffic release information includes target traffic release 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 requested 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, sending the request to an original service module corresponding to the downstream service module;
or,
and when the pre-stored flow release information comprises target flow release information matched with the downstream service module but does not comprise the information of the downstream interface of the request, sending the request to the 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 prestored flow discharge information from the server.
8. The apparatus of claim 5, wherein the information of the requested downstream interface includes a scalar value of the downstream interface; the sending module comprises:
the judging unit is used for judging whether the release proportion value is larger than a randomly generated proportion 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 putting proportion value is larger than the randomly generated proportion 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 having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-4.
11. A computer program product comprising a computer program which, when executed by a processor, implements the method according to 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 true CN112965836A (en) 2021-06-15
CN112965836B 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)

Cited By (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
刘小明;田玉林;唐少虎;尚春琳;魏路;: "基于时延特性建模的多断面短时交通流预测", 交通运输系统工程与信息, no. 03, 15 June 2020 (2020-06-15) *
翁源;黄小红;李丹丹;赵泽华;: "基于DNS的网络多出口流量调度方法", 东南大学学报(自然科学版), no. 1, 20 November 2017 (2017-11-20) *

Cited By (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

Also Published As

Publication number Publication date
CN112965836B (en) 2024-04-23

Similar Documents

Publication Publication Date Title
CN113934464A (en) Method and device for starting android application in Linux system and electronic equipment
JP2022003507A (en) Stress test method and device, electronic apparatus, computer-readable storage medium, and computer program
CN106254471A (en) Resource United Dispatching method and system under a kind of isomery cloud environment
CN112671892B (en) Data transmission method, device, electronic equipment and medium
CN114911598A (en) Task scheduling method, device, equipment and storage medium
CN114816393A (en) Information generation method, device, equipment and storage medium
CN112905314A (en) Asynchronous processing method and device, electronic equipment, storage medium and road side equipment
CN114924745A (en) Operation method and device of deep learning compiler and electronic equipment
CN113377381B (en) Distribution method and device of small program package, electronic equipment and medium
CN114490048A (en) Task execution method and device, electronic equipment and computer storage medium
CN112965836B (en) Service control method, device, electronic equipment and readable storage medium
CN113608765A (en) Data processing method, device, equipment and storage medium
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN115827265A (en) Transaction processing method, device, equipment and storage medium
CN113568706A (en) Container adjusting method and device for service, electronic equipment and storage medium
CN114090247A (en) Method, device, equipment and storage medium for processing data
CN113867920A (en) Task processing method and device, electronic equipment and medium
CN113535187B (en) Service online method, service updating method and service providing method
CN112506582B (en) Method, device, equipment and medium for processing small program data packet
CN115361449B (en) Method, device, equipment and storage medium for adjusting IP resources
CN115150310B (en) Request generation method, request processing device, electronic equipment and storage medium
CN117251250B (en) Container management method based on cloud native platform and related equipment
CN114416040A (en) Page construction method, device, equipment and storage medium
CN114356505A (en) Method, apparatus, device, medium and product for scheduling groups of containers
CN115981872A (en) Method and device for calling algorithm resources, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant