CN115002218B - Traffic distribution method, traffic distribution device, computer equipment and storage medium - Google Patents

Traffic distribution method, traffic distribution device, computer equipment and storage medium Download PDF

Info

Publication number
CN115002218B
CN115002218B CN202210584641.0A CN202210584641A CN115002218B CN 115002218 B CN115002218 B CN 115002218B CN 202210584641 A CN202210584641 A CN 202210584641A CN 115002218 B CN115002218 B CN 115002218B
Authority
CN
China
Prior art keywords
distribution
flow
peripheral system
server
identifier
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
CN202210584641.0A
Other languages
Chinese (zh)
Other versions
CN115002218A (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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202210584641.0A priority Critical patent/CN115002218B/en
Publication of CN115002218A publication Critical patent/CN115002218A/en
Application granted granted Critical
Publication of CN115002218B publication Critical patent/CN115002218B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application belongs to the field of operation and maintenance of base frames, and relates to a flow distribution method, a device, computer equipment and a storage medium. The method comprises the following steps: acquiring a flow distribution request through a front distributor; extracting a first distribution identifier and a second distribution identifier from the traffic distribution request; acquiring a preset peripheral system white list, and inquiring a first distribution identifier in the peripheral system white list; when a first distribution identifier is queried in a white list of a peripheral system, a distribution configuration file is acquired; and carrying out flow distribution on the flow to be distributed corresponding to the flow distribution request according to the distribution configuration file and the second distribution identification. In addition, the present application relates to blockchain technology, in which distribution profiles may be stored. The method and the device realize flow distribution in various forms.

Description

Traffic distribution method, traffic distribution device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of operation and maintenance of base frames, and in particular, to a flow distribution method, a device, a computer device, and a storage medium.
Background
Traffic distribution refers to distributing received traffic to a link, thereby directing the traffic to a particular network node. Current traffic distribution techniques typically make a double write configuration at the gateway through which traffic can be distributed to two backend servers. For example, in the micro-service scenario, after receiving the traffic distribution request, the gateway sends the traffic to be distributed to a first server or a second server at the back end, where the first server and the second server are used for controlling and managing the peripheral system.
In this traffic distribution scenario, the existing traffic distribution technology requires that the two systems that accept dual write flows are substantially similar in terms of configuration of architecture, interfaces, databases, etc.; in addition, when the functions of the back-end system are complex, for example, when the back-end system has priority differences and the old and new systems are matched for use, the back-end system and the peripheral system have various interactions, and the existing flow distribution technology cannot meet the realization of various new requirements.
Disclosure of Invention
The embodiment of the application aims to provide a flow distribution method, a device, computer equipment and a storage medium, so as to realize flow distribution in various forms.
In order to solve the above technical problems, the embodiments of the present application provide a flow distribution method, which adopts the following technical schemes:
acquiring a flow distribution request through a front distributor;
extracting a first distribution identifier and a second distribution identifier from the traffic distribution request;
acquiring a preset peripheral system white list, and inquiring the first distribution identification in the peripheral system white list;
when the first distribution identification is queried in the peripheral system white list, a distribution configuration file is acquired;
and carrying out flow distribution on the flow to be distributed corresponding to the flow distribution request according to the distribution configuration file and the second distribution identifier.
In order to solve the above technical problems, the embodiments of the present application further provide a flow distribution device, which adopts the following technical scheme:
the request acquisition module is used for acquiring a flow distribution request through the front distributor;
the identifier extraction module is used for extracting a first distribution identifier and a second distribution identifier from the flow distribution request;
the identification inquiring module is used for acquiring a preset peripheral system white list and inquiring the first distribution identification in the peripheral system white list;
the file acquisition module is used for acquiring a distribution configuration file when the first distribution identifier is inquired in the peripheral system white list;
and the flow distribution module is used for carrying out flow distribution on the flow to be distributed corresponding to the flow distribution request according to the distribution configuration file and the second distribution identifier.
In order to solve the above technical problems, the embodiments of the present application further provide a computer device, which adopts the following technical schemes:
acquiring a flow distribution request through a front distributor;
extracting a first distribution identifier and a second distribution identifier from the traffic distribution request;
acquiring a preset peripheral system white list, and inquiring the first distribution identification in the peripheral system white list;
when the first distribution identification is queried in the peripheral system white list, a distribution configuration file is acquired;
and carrying out flow distribution on the flow to be distributed corresponding to the flow distribution request according to the distribution configuration file and the second distribution identifier.
In order to solve the above technical problems, embodiments of the present application further provide a computer readable storage medium, which adopts the following technical solutions:
acquiring a flow distribution request through a front distributor;
extracting a first distribution identifier and a second distribution identifier from the traffic distribution request;
acquiring a preset peripheral system white list, and inquiring the first distribution identification in the peripheral system white list;
when the first distribution identification is queried in the peripheral system white list, a distribution configuration file is acquired;
and carrying out flow distribution on the flow to be distributed corresponding to the flow distribution request according to the distribution configuration file and the second distribution identifier.
Compared with the prior art, the embodiment of the application has the following main beneficial effects: the method comprises the steps that a flow distribution request is obtained through a front distributor, wherein the front distributor is specially set for realizing flow distribution; extracting a first distribution identifier and a second distribution identifier for distribution judgment from the flow distribution request; acquiring a preset peripheral system white list, and when a first distribution identifier is queried in the peripheral system white list, indicating that the flow of the peripheral system has priority, or that the peripheral system is a test point system, wherein the flow distribution needs to be further judged; acquiring a distribution configuration file, wherein the distribution configuration file is used for recording how the peripheral system corresponding to the first distribution identifier performs flow distribution, and the second distribution identifier is used for determining a specific distribution strategy, so that ordered distribution of the flow to be distributed is realized; the method and the device for judging the flow to be distributed in multiple dimensions realize flow distribution in multiple forms.
Drawings
For a clearer description of the solution in the present application, a brief description will be given below of the drawings that are needed in the description of the embodiments of the present application, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a traffic distribution method according to the present application;
FIG. 3 is a schematic structural view of one embodiment of a flow distribution device according to the present application;
FIG. 4 is a schematic structural diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description and claims of the present application and in the description of the figures above are intended to cover non-exclusive inclusions. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to better understand the technical solutions of the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include peripheral systems 101, 102, 103, a network 104, and a server 105. The peripheral systems 101, 102, 103 include terminal devices and servers, and are used for implementing a certain service. The network 104 is used as a medium to provide communication links between the peripheral systems 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The server 105 may include a front end distributor, a first server, and a second server. Wherein the front end distributor, the first server and the second server are components of the server 105 that perform different functions. The front distributor is used for realizing flow distribution and distributing the flow to be distributed to the first server or the second server; the first server and the second server are processing servers and are used for controlling and managing the peripheral system. The front end distributor, the first server and the second server may be different components of a certain server entity, or may be independent servers, and together form the server 105. The server 105 may further include a main server for managing the various portions of the server 105.
It should be noted that, the flow distribution method provided in the embodiments of the present application is generally executed by a server, and accordingly, the flow distribution device is generally disposed in the server.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of peripheral systems, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow chart of one embodiment of a traffic distribution method according to the present application is shown. The flow distribution method comprises the following steps:
step S201, a flow distribution request is acquired by a front-end distributor.
In this embodiment, the electronic device (e.g., the server shown in fig. 1) on which the traffic distribution method operates may communicate with the peripheral system through a wired connection or a wireless connection. It should be noted that the wireless connection may include, but is not limited to, 3G/4G/5G connection, wiFi connection, bluetooth connection, wiMAX connection, zigbee connection, UWB (ultra wideband) connection, and other now known or later developed wireless connection.
In particular, the front end distributor is used to implement traffic distribution. The occurrence of traffic to be distributed is accompanied by the generation of a traffic distribution request. In one embodiment, the traffic to be distributed includes a traffic distribution request. The traffic distribution requests are sent to the front-end distributor and processed by the front-end distributor.
Step S202, extracting a first distribution identifier and a second distribution identifier from the traffic distribution request.
Specifically, the front-end distributor extracts the first distribution identification and the second distribution identification from the traffic distribution request. The first distribution identifier and the second distribution identifier may be identifying information in the traffic distribution request, for use in determining traffic distribution.
Step S203, a preset peripheral system white list is obtained, and a first distribution identifier is queried in the peripheral system white list.
Specifically, during traffic distribution, firstly, judgment is performed according to a peripheral system white list. The traffic distribution request and the traffic to be distributed are both related to the peripheral system, and can be actively or passively generated by the peripheral system.
The peripheral system white list is a list that records the system identification of some peripheral systems. The peripheral systems in the peripheral system white list have priority, and the peripheral systems in the peripheral system white list are processed preferentially through a first server in the processing servers.
In one embodiment, a first server of the processing servers is newly constructed with newer processing logic, and a portion of the peripheral systems also act as the test point systems, employing newer business processing logic, which can be recorded in the peripheral system whitelist, prioritizing processing by the first server.
The first distribution identification may be a system identification of the peripheral system. And inquiring the first distribution identification in the peripheral system white list to determine whether the first distribution identification is recorded in the peripheral system white list.
Step S204, when the first distribution identification is inquired in the white list of the peripheral system, a distribution configuration file is obtained.
Specifically, when the first distribution identifier is queried in the white list of the peripheral system, the distribution configuration file needs to be acquired again. The distribution profile records how traffic distribution is performed to peripheral systems in the peripheral system whitelist. In one embodiment, the distribution configuration file may be an uploaded file, or the first server and the second server may be generated according to the processed peripheral systems, which indicates that the first/second server may process the traffic to be distributed related to the peripheral systems.
It should be emphasized that, to further ensure the privacy and security of the distribution profile, the distribution profile may also be stored in a blockchain node.
The blockchain referred to in the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
Step S205, according to the distribution configuration file and the second distribution identification, the flow to be distributed corresponding to the flow distribution request is distributed.
Specifically, in the present application, the peripheral system may interact with the first server and the second server at the back end in multiple forms, including through the message queue MQ (Message queue), through the peripheral system or the timing tasks set in the first/second server, and through the peripheral system, interface calls of the first/second server.
The interaction form affects the traffic distribution policy. However, in any interaction form, the second distribution identifier needs to be queried in the distribution configuration file, so that a corresponding flow distribution strategy is obtained, and according to the obtained flow distribution strategy, the front-end distributor distributes the flow to be distributed corresponding to the flow distribution request to the first server or the second server at the back end.
Further, after the step of querying the first distribution identifier in the white list of the peripheral system, the method may further include: and when the first distribution identification is not queried in the white list of the peripheral system, distributing the flow to be distributed corresponding to the flow distribution request to a second server through the front distributor.
Specifically, when the first distribution identifier is not queried in the white list of the peripheral systems, the peripheral systems associated with the traffic distribution request are indicated to have no priority, and are not trial-and-error systems. At this time, the front-end distributor may distribute the traffic to be distributed corresponding to the traffic distribution request to the second server, and the second server responds and processes the traffic to be distributed.
In this embodiment, when the first distribution identifier is not queried in the white list of the peripheral system, it indicates that the peripheral system is a common peripheral system, and the front-end distributor may distribute the traffic to be distributed to the second server, so as to implement the processing of the traffic to be distributed.
In this embodiment, the flow distribution request is obtained through a front-end distributor, where the front-end distributor is set in a special project, and is used for realizing flow distribution; extracting a first distribution identifier and a second distribution identifier for distribution judgment from the flow distribution request; acquiring a preset peripheral system white list, and when a first distribution identifier is queried in the peripheral system white list, indicating that the flow of the peripheral system has priority, or that the peripheral system is a test point system, wherein the flow distribution needs to be further judged; acquiring a distribution configuration file, wherein the distribution configuration file is used for recording how the peripheral system corresponding to the first distribution identifier performs flow distribution, and the second distribution identifier is used for determining a specific distribution strategy, so that ordered distribution of the flow to be distributed is realized; the method and the device for judging the flow to be distributed in multiple dimensions realize flow distribution in multiple forms.
Further, when the traffic distribution request is triggered based on the message queue, the step S205 may include: distributing the flow to be distributed to a database through a front distributor to obtain stored data; inquiring a second distribution identifier in the distribution configuration file to determine a processing server corresponding to the stored data; the processing server comprises a first server and a second server, and is used for carrying out data processing on stored data.
Specifically, the traffic distribution request may be triggered by a message queue, at which time the peripheral system interacts with the backend server through the message queue. There may be a message queue between the peripheral system and the front-end distributor, to which the traffic distribution requests and traffic to be distributed generated by the peripheral system are sent. And after receiving the flow distribution request, the front distributor consumes the flow to be distributed in the message queue, and distributes the flow to be distributed to the database to obtain stored data. The database here may be a database in the first server as well as in the second server.
The second distribution identification may then be queried in the distribution profile to determine the processing servers that need to perform data processing on the stored data. In one embodiment, each of the first and second servers has a distribution profile, the first and second servers can respectively query in the respective distribution profiles, and the server querying the second distribution identifier in the distribution profile is used as a processing server corresponding to the stored data to process the stored data. In one embodiment, the second distribution identification may be a system identification of the peripheral system when the traffic distribution request is triggered based on the message queue.
In this embodiment, when the flow distribution request is triggered based on the message queue, the front-end distributor may consume the flow distribution request, and the first/second server at the back end performs the database dropping, so that the stored data after the database dropping is processed according to the second distribution identifier, and the first server and the second server database have the same data, so that the processing server in the peripheral system docking is ensured to be switched.
Further, when the traffic distribution request is triggered based on the timing task or the peripheral system interface call, the step S205 may further include: inquiring a second distribution identifier in the distribution configuration file to determine a processing server corresponding to the flow to be distributed; and distributing the flow to be distributed corresponding to the flow distribution request to a processing server through the front distributor.
Specifically, the first/second server is provided therein with a timing task, for example, version information of the peripheral system is synchronized from the peripheral system by the timing task; the first/second server needs to perform defect management on the peripheral system and synchronize defect information recorded in the peripheral system; acquiring set tasks from a peripheral system at regular time to execute; a user of the peripheral system may upload system requirements through the peripheral system, and the first/second server needs to synchronize the system requirements from the peripheral system; information for setting and modifying the first/second server is acquired from the peripheral system at regular time.
The traffic distribution request may be triggered based on a timed task. The traffic distribution request triggered based on the timing task corresponds to the first/second server invoking the interface of the peripheral system. The first server and the second server are respectively inquired in the distribution configuration files, when the second distribution identifiers are recorded in the distribution configuration files, the first server and the second server are used as processing servers of traffic to be distributed, and the front-end distributor distributes the traffic to be distributed to the processing servers. When the traffic distribution request is triggered based on the timing task, the second distribution identification may be a system identification of the peripheral system.
The peripheral system may actively invoke the first/second server, triggering a traffic distribution request based on the peripheral system interface invocation. At this time, the second distribution identification may be a system identification of the peripheral system or a version identification version id representing version information of the peripheral system. The first server/the second server inquires a second distribution identification in the respective distribution configuration file, and when the second distribution identification is inquired, the first server/the second server serve as processing servers of traffic to be distributed, and the front-end distributor distributes the traffic to be distributed to the processing servers.
In the embodiment, the traffic distribution under the timing task and the peripheral system interface call can be processed, so that the realization form of the traffic distribution is enriched.
Further, the above-mentioned traffic distribution method may further include: and sending a data synchronization instruction to the first server and the second server to instruct the first server and the second server to perform data synchronization between the servers.
Specifically, the first server and the second server may perform data synchronization according to the triggered data synchronization instruction. The data synchronization instruction can be generated by a front-end distributor and sent to the first server and the second server; either one of the first server and the second server generates and sends the data to the other party, or after the data is generated, the data is synchronized according to the data synchronization instruction triggered by the server; alternatively, the data synchronization instruction is generated by the host server.
The first server and the second server are pre-configured with data synchronization links through which mutual data synchronization is achieved. Data synchronization includes delta synchronization and full synchronization. During incremental synchronization, one party of synchronization obtains self-incremental data identification from the other party, the data identification can be stored identification of each piece of data, the data identification is used as a main key, and corresponding data is obtained from the other party.
In this embodiment, data synchronization may be performed between the first server and the second server, so that the first server and the second server may maintain the same data.
Further, the above-mentioned traffic distribution method may further include: receiving operation feedback information sent by a peripheral system; when the peripheral system is determined to be abnormal in operation according to the operation feedback information, server switching information is sent to the peripheral system, and a white list of the peripheral system is modified so as to switch the processing server corresponding to the peripheral system.
The operation feedback information may be operation state information of the peripheral system in the first/second server, and may indicate whether the peripheral system operates normally.
The peripheral system is controlled and managed by the first/second server, and a user of the peripheral system can generate operation feedback information according to the operation condition of the peripheral system. When the peripheral system is determined to be abnormally operated according to the operation feedback information, server switching information can be sent to the peripheral system by the main server or the corresponding processing server so as to prompt a user of the peripheral system to use the peripheral system through another processing server. And simultaneously, modifying the white list of the peripheral system or modifying the white list of the peripheral system and distributing configuration files, so as to modify a processing server in butt joint with the peripheral system and ensure that the peripheral system can normally operate.
In this embodiment, when an abnormality occurs in the peripheral system, the processing server corresponding to the peripheral system is switched, so as to ensure that the peripheral system can operate normally.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by computer readable instructions stored in a computer readable storage medium that, when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a flow distribution device, where an embodiment of the device corresponds to the embodiment of the method shown in fig. 2, and the device may be specifically applied to various electronic devices.
As shown in fig. 3, the flow distribution device 300 according to the present embodiment includes: a request acquisition module 301, an identification extraction module 302, an identification query module 303, a file acquisition module 304, and a traffic distribution module 305, wherein:
the request acquisition module 301 is configured to acquire a traffic distribution request through a pre-distributor.
The identifier extraction module 302 is configured to extract a first distribution identifier and a second distribution identifier from the traffic distribution request.
The identifier query module 303 is configured to obtain a preset white list of the peripheral system, and query the first distribution identifier in the white list of the peripheral system.
The file obtaining module 304 is configured to obtain a distribution configuration file when the first distribution identifier is queried in the white list of the peripheral system.
And the traffic distribution module 305 is configured to perform traffic distribution on traffic to be distributed corresponding to the traffic distribution request according to the distribution configuration file and the second distribution identifier.
In this embodiment, the flow distribution request is obtained through a front-end distributor, where the front-end distributor is set in a special project, and is used for realizing flow distribution; extracting a first distribution identifier and a second distribution identifier for distribution judgment from the flow distribution request; acquiring a preset peripheral system white list, and when a first distribution identifier is queried in the peripheral system white list, indicating that the flow of the peripheral system has priority, or that the peripheral system is a test point system, wherein the flow distribution needs to be further judged; acquiring a distribution configuration file, wherein the distribution configuration file is used for recording how the peripheral system corresponding to the first distribution identifier performs flow distribution, and the second distribution identifier is used for determining a specific distribution strategy, so that ordered distribution of the flow to be distributed is realized; the method and the device for judging the flow to be distributed in multiple dimensions realize flow distribution in multiple forms.
In some optional implementations of this embodiment, the traffic distribution apparatus 300 further includes a second forwarding module, where the second forwarding module is configured to distribute, through the front-end distributor, to-be-distributed traffic corresponding to the traffic distribution request to the second server when the first distribution identifier is not queried in the white list of the peripheral system.
In this embodiment, when the first distribution identifier is not queried in the white list of the peripheral system, it indicates that the peripheral system is a common peripheral system, and the front-end distributor may distribute the traffic to be distributed to the second server, so as to implement the processing of the traffic to be distributed.
In some optional implementations of this embodiment, when the traffic distribution request is triggered based on the message queue, the traffic distribution module 305 may include: a database distribution sub-module and an identification query sub-module, wherein:
and the database distribution sub-module is used for distributing the flow to be distributed to the database through the front distributor to obtain stored data.
The identifier inquiry sub-module is used for inquiring the second distribution identifier in the distribution configuration file so as to determine a processing server corresponding to the stored data; the processing server comprises a first server and a second server, and is used for carrying out data processing on stored data.
In this embodiment, when the flow distribution request is triggered based on the message queue, the front-end distributor may consume the flow distribution request, and the first/second server at the back end performs the database dropping, so that the stored data after the database dropping is processed according to the second distribution identifier, and the first server and the second server database have the same data, so that the processing server in the peripheral system docking is ensured to be switched.
In some optional implementations of the present embodiment, when the traffic distribution request is triggered based on a timing task or based on a peripheral system interface call, the traffic distribution module 305 may further include: the second inquiry submodule and the flow distribution submodule, wherein:
and the second inquiry submodule is used for inquiring the second distribution identification in the distribution configuration file so as to determine the processing server corresponding to the flow to be distributed.
And the flow distribution sub-module is used for distributing the flow to be distributed corresponding to the flow distribution request to the processing server through the front distributor.
In the embodiment, the traffic distribution under the timing task and the peripheral system interface call can be processed, so that the realization form of the traffic distribution is enriched.
In some optional implementations of the present embodiment, the flow distribution device 300 may further include: an instruction sending module, wherein:
and the instruction sending module is used for sending a data synchronization instruction to the first server and the second server so as to instruct the first server and the second server to perform data synchronization between the servers.
In this embodiment, data synchronization may be performed between the first server and the second server, so that the first server and the second server may maintain the same data.
In some optional implementations of this embodiment, the flow distribution device 300 further includes: the device comprises a feedback receiving module and a switching modification module, wherein:
and the feedback receiving module is used for receiving the operation feedback information sent by the peripheral system.
And the switching modification module is used for sending server switching information to the peripheral system when the peripheral system is determined to be abnormal in operation according to the operation feedback information, and modifying the white list of the peripheral system so as to switch the processing server corresponding to the peripheral system.
In this embodiment, when an abnormality occurs in the peripheral system, the processing server corresponding to the peripheral system is switched, so as to ensure that the peripheral system can operate normally.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 4, fig. 4 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It should be noted that only computer device 4 having components 41-43 is shown in the figures, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculations and/or information processing in accordance with predetermined or stored instructions, the hardware of which includes, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASICs), programmable gate arrays (fields-Programmable Gate Array, FPGAs), digital processors (Digital Signal Processor, DSPs), embedded devices, etc.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 4. Of course, the memory 41 may also comprise both an internal memory unit of the computer device 4 and an external memory device. In this embodiment, the memory 41 is typically used to store an operating system and various application software installed on the computer device 4, such as computer readable instructions of a traffic distribution method, and the like. Further, the memory 41 may be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, such as computer readable instructions for executing the traffic distribution method.
The network interface 43 may comprise a wireless network interface or a wired network interface, which network interface 43 is typically used for establishing a communication connection between the computer device 4 and other electronic devices.
The computer device provided in the present embodiment may perform the above-described traffic distribution method. The traffic distribution method here may be the traffic distribution method of each of the above embodiments.
In this embodiment, the flow distribution request is obtained through a front-end distributor, where the front-end distributor is set in a special project, and is used for realizing flow distribution; extracting a first distribution identifier and a second distribution identifier for distribution judgment from the flow distribution request; acquiring a preset peripheral system white list, and when a first distribution identifier is queried in the peripheral system white list, indicating that the flow of the peripheral system has priority, or that the peripheral system is a test point system, wherein the flow distribution needs to be further judged; acquiring a distribution configuration file, wherein the distribution configuration file is used for recording how the peripheral system corresponding to the first distribution identifier performs flow distribution, and the second distribution identifier is used for determining a specific distribution strategy, so that ordered distribution of the flow to be distributed is realized; the method and the device for judging the flow to be distributed in multiple dimensions realize flow distribution in multiple forms.
The present application also provides another embodiment, namely, a computer readable storage medium storing computer readable instructions executable by at least one processor to cause the at least one processor to perform the steps of a traffic distribution method as described above.
In this embodiment, the flow distribution request is obtained through a front-end distributor, where the front-end distributor is set in a special project, and is used for realizing flow distribution; extracting a first distribution identifier and a second distribution identifier for distribution judgment from the flow distribution request; acquiring a preset peripheral system white list, and when a first distribution identifier is queried in the peripheral system white list, indicating that the flow of the peripheral system has priority, or that the peripheral system is a test point system, wherein the flow distribution needs to be further judged; acquiring a distribution configuration file, wherein the distribution configuration file is used for recording how the peripheral system corresponding to the first distribution identifier performs flow distribution, and the second distribution identifier is used for determining a specific distribution strategy, so that ordered distribution of the flow to be distributed is realized; the method and the device for judging the flow to be distributed in multiple dimensions realize flow distribution in multiple forms.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
It is apparent that the embodiments described above are only some embodiments of the present application, but not all embodiments, the preferred embodiments of the present application are given in the drawings, but not limiting the patent scope of the present application. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a more thorough understanding of the present disclosure. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing, or equivalents may be substituted for elements thereof. All equivalent structures made by the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the protection scope of the application.

Claims (8)

1. A method of traffic distribution, comprising the steps of:
acquiring a flow distribution request through a front distributor;
extracting a first distribution identifier and a second distribution identifier from the traffic distribution request;
acquiring a preset peripheral system white list, and inquiring the first distribution identification in the peripheral system white list;
when the first distribution identification is queried in the peripheral system white list, a distribution configuration file is acquired;
performing flow distribution on the flow to be distributed corresponding to the flow distribution request according to the distribution configuration file and the second distribution identifier;
when the flow distribution request is triggered based on a message queue, the step of performing flow distribution on the flow to be distributed corresponding to the flow distribution request according to the distribution configuration file and the second distribution identifier includes:
distributing the flow to be distributed to a database through the front distributor to obtain stored data;
querying the second distribution identification in the distribution configuration file to determine a processing server corresponding to the stored data; the processing server comprises a first server and a second server, and is used for carrying out data processing on the stored data;
the flow distribution method further comprises the following steps:
receiving operation feedback information sent by a peripheral system;
when the peripheral system is determined to be abnormal in operation according to the operation feedback information, server switching information is sent to the peripheral system, and the peripheral system white list is modified so as to switch the processing server corresponding to the peripheral system.
2. The traffic distribution method according to claim 1, wherein after the step of querying the peripheral system whitelist for the first distribution identifier, further comprising:
and when the first distribution identifier is not queried in the peripheral system white list, distributing the flow to be distributed corresponding to the flow distribution request to a second server through the front-end distributor.
3. The method for distributing traffic according to claim 1, wherein when the traffic distribution request is triggered based on a timing task or based on a peripheral system interface call, the step of distributing traffic to be distributed corresponding to the traffic distribution request according to the distribution profile and the second distribution identifier comprises:
inquiring the second distribution identification in the distribution configuration file to determine a processing server corresponding to the flow to be distributed;
and distributing the flow to be distributed corresponding to the flow distribution request to the processing server through the front-end distributor.
4. The traffic distribution method according to claim 1, characterized in that the traffic distribution method further comprises:
and sending a data synchronization instruction to the first server and the second server to instruct the first server and the second server to perform data synchronization between servers.
5. A flow distribution device, comprising:
the request acquisition module is used for acquiring a flow distribution request through the front distributor;
the identifier extraction module is used for extracting a first distribution identifier and a second distribution identifier from the flow distribution request;
the identification inquiring module is used for acquiring a preset peripheral system white list and inquiring the first distribution identification in the peripheral system white list;
the file acquisition module is used for acquiring a distribution configuration file when the first distribution identifier is inquired in the peripheral system white list;
the flow distribution module is used for carrying out flow distribution on the flow to be distributed corresponding to the flow distribution request according to the distribution configuration file and the second distribution identifier;
when the flow distribution request is triggered based on a message queue, the flow distribution module is further used for distributing the flow to be distributed to a database through the front distributor to obtain stored data; querying the second distribution identification in the distribution configuration file to determine a processing server corresponding to the stored data; the processing server comprises a first server and a second server, and is used for carrying out data processing on the stored data;
the feedback receiving module is used for receiving operation feedback information sent by the peripheral system;
and the switching modification module is used for sending server switching information to the peripheral system when the peripheral system is determined to be abnormal in operation according to the operation feedback information, and modifying the white list of the peripheral system so as to switch the processing server corresponding to the peripheral system.
6. The flow distribution device according to claim 5, wherein the flow distribution device further comprises:
and the second forwarding module is used for distributing the traffic to be distributed corresponding to the traffic distribution request to a second server through the front-end distributor when the first distribution identifier is not queried in the white list of the peripheral system.
7. A computer device comprising a memory having stored therein computer readable instructions which when executed by a processor implement the steps of the traffic distribution method according to any of claims 1 to 4.
8. A computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of the flow distribution method according to any of claims 1 to 4.
CN202210584641.0A 2022-05-26 2022-05-26 Traffic distribution method, traffic distribution device, computer equipment and storage medium Active CN115002218B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210584641.0A CN115002218B (en) 2022-05-26 2022-05-26 Traffic distribution method, traffic distribution device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210584641.0A CN115002218B (en) 2022-05-26 2022-05-26 Traffic distribution method, traffic distribution device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115002218A CN115002218A (en) 2022-09-02
CN115002218B true CN115002218B (en) 2023-08-04

Family

ID=83028987

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210584641.0A Active CN115002218B (en) 2022-05-26 2022-05-26 Traffic distribution method, traffic distribution device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115002218B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707644A (en) * 2017-09-27 2018-02-16 北京趣拿软件科技有限公司 Processing method, device, storage medium, processor and the terminal of request message
CN110661849A (en) * 2019-08-30 2020-01-07 中国人民财产保险股份有限公司 Request processing method and device, electronic equipment and storage medium
CN111026769A (en) * 2019-10-16 2020-04-17 平安科技(深圳)有限公司 Working method of dual-core front-end system and related equipment thereof
CN113254165A (en) * 2021-07-09 2021-08-13 易纳购科技(北京)有限公司 Load flow distribution method and device for virtual machine and container, and computer equipment
CN114143269A (en) * 2021-11-12 2022-03-04 上海途虎信息技术有限公司 HTTP request distribution method, device, equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3499846B1 (en) * 2017-09-12 2021-04-14 Wangsu Science & Technology Co., Ltd. File distribution method, file download method, distribution server, client, and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707644A (en) * 2017-09-27 2018-02-16 北京趣拿软件科技有限公司 Processing method, device, storage medium, processor and the terminal of request message
CN110661849A (en) * 2019-08-30 2020-01-07 中国人民财产保险股份有限公司 Request processing method and device, electronic equipment and storage medium
CN111026769A (en) * 2019-10-16 2020-04-17 平安科技(深圳)有限公司 Working method of dual-core front-end system and related equipment thereof
CN113254165A (en) * 2021-07-09 2021-08-13 易纳购科技(北京)有限公司 Load flow distribution method and device for virtual machine and container, and computer equipment
CN114143269A (en) * 2021-11-12 2022-03-04 上海途虎信息技术有限公司 HTTP request distribution method, device, equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
流量大数据安全分析平台的设计与实现;杨敏;何海涛;赵琼;;通信学报(S1);第110-115页 *

Also Published As

Publication number Publication date
CN115002218A (en) 2022-09-02

Similar Documents

Publication Publication Date Title
CN110569309A (en) Apparatus, method, system, and medium for implementing blockchains
CN112380227B (en) Data synchronization method, device, equipment and storage medium based on message queue
CN110569251A (en) Data processing method, related equipment and computer readable storage medium
CN110740057B (en) Service deployment method and block chain platform
CN112199442B (en) Method, device, computer equipment and storage medium for distributed batch downloading files
CN110597918A (en) Account management method and device and computer readable storage medium
CN112468409A (en) Access control method, device, computer equipment and storage medium
CN111475309A (en) Data processing method, device, block chain service system and storage medium
CN110839071B (en) Information storage method, device and storage medium based on block chain
WO2020224100A1 (en) Blockchain configuration file processing apparatus, system, and method, and storage medium
CN104639650A (en) Fine granularity distributive interface access control method and device
CN115277566B (en) Load balancing method and device for data access, computer equipment and medium
CN112087497B (en) Data synchronization method and device, electronic equipment and readable storage medium
CN115567594A (en) Microservice request processing method, microservice request processing device, computer equipment and storage medium
CN112860662A (en) Data blood relationship establishing method and device, computer equipment and storage medium
CN112286664A (en) Task scheduling method and device, computer equipment and readable storage medium
US20070050447A1 (en) Method and device arrangement for managing a client/server environment
CN108520401B (en) User list management method, device, platform and storage medium
CN114567600A (en) Traffic management method and related equipment
CN110189440A (en) A kind of smart lock monitoring equipment and its method based on block chain
CN113791735A (en) Video data storage method and device, computer equipment and storage medium
CN115002218B (en) Traffic distribution method, traffic distribution device, computer equipment and storage medium
CN113360172B (en) Application deployment method, device, computer equipment and storage medium
CN113434824B (en) Software service authorization management method, device, equipment and storage medium
CN113420050A (en) Data query management method and device, computer equipment and readable 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