CN115002218A - 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
CN115002218A
CN115002218A CN202210584641.0A CN202210584641A CN115002218A CN 115002218 A CN115002218 A CN 115002218A CN 202210584641 A CN202210584641 A CN 202210584641A CN 115002218 A CN115002218 A CN 115002218A
Authority
CN
China
Prior art keywords
distribution
traffic
server
peripheral system
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.)
Granted
Application number
CN202210584641.0A
Other languages
Chinese (zh)
Other versions
CN115002218B (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

Images

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 pedestal operation and maintenance, and relates to a flow distribution method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring a flow distribution request through a prepositive distributor; extracting a first distribution identifier and a second distribution identifier from the traffic distribution request; acquiring a preset white list of a peripheral system, and inquiring a first distribution identifier in the white list of the peripheral system; when a first distribution identifier is inquired in a white list of a peripheral system, a distribution configuration file is obtained; and carrying out traffic distribution on the traffic to be distributed corresponding to the traffic distribution request according to the distribution configuration file and the second distribution identifier. In addition, the application also relates to a block chain technology, and the distribution configuration file can be stored in the block chain. The method and the device realize the traffic distribution under various forms.

Description

Flow distribution method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of pedestal operation and maintenance technologies, and in particular, to a method and an apparatus for distributing traffic, 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 involve a double write configuration at the gateway, where traffic passing through the gateway can be distributed to two backend servers. For example, in a micro-service scenario, after receiving a traffic distribution request, a gateway sends traffic to be distributed to a first server or a second server at a back end, where the first server and the second server are used to control and manage a peripheral system.
In such a traffic distribution scenario, the existing traffic distribution technology requires that two systems accepting dual write streams are substantially similar in architecture, interface, database, and other configurations; in addition, when the function of the back-end system is complex, for example, when the back-end system has priority difference and new and old systems are used cooperatively, the back-end system and the peripheral system have interaction in various forms, and the existing traffic distribution technology cannot meet the realization of various new requirements.
Disclosure of Invention
The embodiment of the application aims to provide a traffic distribution method, a traffic distribution device, computer equipment and a storage medium, so as to realize traffic distribution in various forms.
In order to solve the foregoing technical problem, an embodiment of the present application provides a traffic distribution method, which adopts the following technical solutions:
acquiring a flow distribution request through a prepositive distributor;
extracting a first distribution identifier and a second distribution identifier from the traffic distribution request;
acquiring a preset white list of a peripheral system, and inquiring the first distribution identifier in the white list of the peripheral system;
when the first distribution identification is inquired in the white list of the peripheral system, a distribution configuration file is obtained;
and performing traffic distribution on the traffic to be distributed corresponding to the traffic distribution request according to the distribution configuration file and the second distribution identifier.
In order to solve the above technical problem, an embodiment of the present application further provides a traffic distribution apparatus, which adopts the following technical solutions:
the request acquisition module is used for acquiring a flow distribution request through the front distributor;
the identification extraction module is used for extracting a first distribution identification and a second distribution identification from the flow distribution request;
the identifier query module is used for acquiring a preset white list of the peripheral system and querying the first distribution identifier in the white list of the peripheral system;
the file acquisition module is used for acquiring a distribution configuration file when the first distribution identifier is inquired in the white list of the peripheral system;
and the traffic distribution module is used for carrying out traffic distribution on the traffic to be distributed corresponding to the traffic distribution request according to the distribution configuration file and the second distribution identifier.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, 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 white list of a peripheral system, and inquiring the first distribution identifier in the white list of the peripheral system;
when the first distribution identification is inquired in the white list of the peripheral system, a distribution configuration file is obtained;
and performing traffic distribution on the traffic to be distributed corresponding to the traffic distribution request according to the distribution configuration file and the second distribution identifier.
In order to solve the above technical problem, an embodiment of the present application further provides 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 white list of a peripheral system, and inquiring the first distribution identifier in the white list of the peripheral system;
when the first distribution identification is inquired in the white list of the peripheral system, a distribution configuration file is obtained;
and performing traffic distribution on the traffic to be distributed corresponding to the traffic distribution request according to the distribution configuration file and the second distribution identifier.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects: acquiring a flow distribution request through a front distributor, wherein the front distributor is specially set and is used for realizing flow distribution; extracting a first distribution identifier and a second distribution identifier for distribution judgment from the traffic distribution request; acquiring a preset white list of the peripheral system, and when a first distribution identifier is inquired in the white list of the peripheral system, indicating that the flow of the peripheral system has priority, or the peripheral system is a trial system and further judgment needs to be made on flow distribution; then 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 the ordered distribution of the flow to be distributed is realized; the method and the device for judging the flow to be distributed have the advantages that the flow to be distributed is judged in multiple dimensions, and the flow distribution in multiple forms is realized.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a traffic distribution method according to the present application;
FIG. 3 is a schematic block diagram of one embodiment of a traffic distribution apparatus according to the present application;
FIG. 4 is a schematic block 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 application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase 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. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below 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, and 103 include terminal devices and servers, and are used to implement a certain service. Network 104 serves as a medium for providing communication links between peripheral systems 101, 102, 103 and server 105. 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 dispatcher, a first server, and a second server. The front distributor, the first server and the second server are components of the server 105 that implement different functions. The front-end distributor is used for realizing flow distribution and distributing 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 constitute the server 105. The server 105 may also include a main server for managing various components of the server 105.
It should be noted that the traffic distribution method provided in the embodiment of the present application is generally executed by a server, and accordingly, the traffic distribution apparatus 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 an implementation.
With continued reference to fig. 2, a flow diagram 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 pre-dispatcher acquires a traffic distribution request.
In this embodiment, an electronic device (for example, a server shown in fig. 1) on which the traffic distribution method operates may communicate with the peripheral system by a wired connection manner or a wireless connection manner. It should be noted that the above-mentioned wireless connection modes may include, but are 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 modes.
In particular, the front dispatcher is used to implement traffic distribution. The occurrence of traffic to be distributed is accompanied by the generation of traffic distribution requests. In one embodiment, the traffic to be distributed includes a traffic distribution request. The traffic distribution requests are all sent to the front distributor and processed by the front distributor.
Step S202, extracting the first distribution identifier and the second distribution identifier from the traffic distribution request.
Specifically, the front distributor extracts a first distribution identifier and a second distribution identifier from the traffic distribution request. The first distribution identifier and the second distribution identifier may be identification information in the traffic distribution request, and are used for judging traffic distribution.
Step S203, acquiring a preset white list of the peripheral system, and querying the first distribution identifier in the white list of the peripheral system.
Specifically, when traffic is distributed, firstly, the judgment is performed according to a white list of a peripheral system. 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 white list of the peripheral systems have priorities, and the peripheral systems in the white list of the peripheral systems are processed preferentially through the first server in the processing server.
In one embodiment, a first one of the processing servers is newly constructed with newer processing logic, and a portion of the peripheral systems also serve as point-of-sale systems, and with newer business processing logic, these peripheral systems may be recorded in a peripheral system white list, giving priority to processing by the first server.
The first distribution identifier may be a system identifier of the peripheral system. And querying the first distribution identifier in the white list of the peripheral system to determine whether the first distribution identifier is recorded in the white list of the peripheral system.
And step S204, when the first distribution identification is inquired in the white list of the peripheral system, obtaining a distribution configuration file.
Specifically, when the first distribution identifier is queried in the white list of the peripheral system, the distribution configuration file needs to be obtained again. The distribution configuration file records how to distribute traffic to the peripheral systems in the white list of the peripheral systems. In one embodiment, the distribution configuration file may be an uploaded file, or the first server and the second server may generate the distribution configuration file according to processed peripheral systems, indicating that the first/second server may process the traffic to be distributed related to the peripheral systems.
It is emphasized that the distribution profile may also be stored in a node of a blockchain in order to further ensure privacy and security of the distribution profile.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
And step S205, carrying out traffic distribution on the traffic to be distributed corresponding to the traffic distribution request according to the distribution configuration file and the second distribution identifier.
Specifically, in the present application, the peripheral system may perform interaction in various forms with the first server and the second server at the back end, including interaction through a message queue mq (message queue), interaction through a timing task set in the peripheral system or the first/second server, and interaction through the peripheral system with an interface call of the first/second server.
The interaction pattern affects the traffic distribution policy. However, in any interaction form, the second distribution identifier needs to be queried in the distribution configuration file, so as to obtain a corresponding traffic distribution policy, and according to the obtained traffic distribution policy, the pre-dispatcher distributes the traffic to be distributed corresponding to the traffic distribution request to the first server or the second server at the back end.
Further, after the step of querying the white list of the peripheral system for the first distribution identifier, the method may further include: and when the first distribution identifier is not inquired in the white list of the peripheral system, distributing the traffic to be distributed corresponding to the traffic distribution request to a second server through a front distributor.
Specifically, when the first distribution identifier is not queried in the white list of the peripheral systems, it indicates that the peripheral system associated with the traffic distribution request has no priority, and is not a pilot system. At this time, the pre-dispatcher may dispatch traffic to be dispatched, which corresponds to the traffic dispatching request, to the second server, and the second server may respond to and process the traffic to be dispatched.
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 normal peripheral system, and the pre-distributor may distribute the traffic to be distributed to the second server, thereby implementing processing of the traffic to be distributed.
In this embodiment, the traffic distribution request is obtained through a pre-distributor, which is set in a dedicated manner and is used to implement traffic distribution; extracting a first distribution identifier and a second distribution identifier for distribution judgment from the traffic distribution request; acquiring a preset white list of the peripheral system, and when a first distribution identifier is inquired in the white list of the peripheral system, indicating that the flow of the peripheral system has priority, or the peripheral system is a trial system and further judgment needs to be made on flow distribution; then 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 the ordered distribution of the flow to be distributed is realized; the method and the device for judging the flow to be distributed have the advantages that the flow to be distributed is judged in multiple dimensions, and the flow distribution in multiple forms is realized.
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 the processing server is used for processing the stored data.
Specifically, the traffic distribution request may be triggered by a message queue, and at this time, the peripheral system interacts with the server at the back end through the message queue. There may be a message queue between the peripheral system and the front dispatcher, and traffic distribution requests generated by the peripheral system and traffic to be distributed are sent to the front dispatcher. And after receiving the flow distribution request, the prepositive distributor consumes the flow to be distributed in the message queue, and distributes the flow to be distributed to the database to obtain the stored data. The database may be a database in the first server and the second server.
The second distribution identity may then be queried in the distribution profile to determine the processing server that needs to perform data processing on the stored data. In one embodiment, the first and second servers each have a distribution profile, and the first and second servers may respectively perform queries in the respective distribution profiles, and the server querying the second distribution identifier in the distribution profile will serve as a processing server corresponding to the stored data to perform data processing on the stored data. In one embodiment, when the traffic distribution request is triggered based on a message queue, the second distribution identification may be a system identification of the peripheral system.
In this embodiment, when the flow distribution request is triggered based on the message queue, the flow distribution request may be consumed by the front distributor, and the first/second server at the back end performs the library dropping, so that the stored data after the library dropping is processed according to the second distribution identifier, and the first server and the second server database have the same data, thereby ensuring that the processing server docked by the peripheral system can be switched.
Further, when the traffic distribution request is triggered based on the timing task or based on the peripheral system interface call, 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 traffic to be distributed corresponding to the traffic distribution request to the processing server through the front distributor.
Specifically, a timing task is set in the first/second server, 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 needs to synchronize defect information recorded in the peripheral system; acquiring a set task from a peripheral system at regular time and executing the task; the user of the peripheral system can upload system requirements through the peripheral system, and the first/second server needs to synchronize the system requirements from the peripheral system; and acquiring information for setting and modifying the first/second server from the peripheral system at regular time.
The traffic distribution request may be triggered based on a timed task. And based on the flow distribution request triggered by the timing task, the first/second server calls an interface of the peripheral system. And the first server and the second server respectively inquire in the distribution configuration file, and when the inquiry shows that the second distribution identification is recorded in the respective distribution configuration file, the first server and the second server serve as processing servers of the traffic to be distributed, and the pre-distributor distributes the traffic to be distributed to the processing servers. When the traffic distribution request is triggered based on the timed task, the second distribution identification may be a system identification of the peripheral system.
The peripheral system may actively invoke the first/second server, and then trigger the traffic distribution request based on the peripheral system interface call. At this time, the second distribution identifier may be a system identifier of the peripheral system or a version identifier versionID representing version information of the peripheral system. The first server and the second server inquire a second distribution identification in respective distribution configuration files, and when the second distribution identification is inquired, the first server and the second server serve as a processing server of the traffic to be distributed, and the pre-distributor distributes the traffic to be distributed to the processing server.
In the embodiment, the flow distribution under the calling of the timing task and the peripheral system interface can be processed, and the implementation form of the flow distribution is enriched.
Further, the 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 distributor and sent to the first server and the second server; or any one of the first server and the second server generates a data synchronization instruction to be sent to the other side, or after the data synchronization instruction is generated, the data synchronization is carried out according to the data synchronization instruction triggered by the first server and the second server; alternatively, the data synchronization instruction is generated by the master server.
The first server and the second server are pre-configured with a data synchronization link, and mutual data synchronization is realized through the data synchronization link. The data synchronization includes incremental synchronization and full synchronization. During incremental synchronization, one synchronous party acquires self-increment data identification from the other synchronous party, the data identification can be the identification of each piece of stored data, the data identification is used as a main key, and corresponding data is acquired from the other synchronous 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 traffic distribution method may further include: receiving operation feedback information sent by a peripheral system; and when the peripheral system is determined to be abnormal according to the operation feedback information, sending server switching information to the peripheral system, and modifying a white list of the peripheral system so as to switch a 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 operation of the peripheral system is normal.
The peripheral system is controlled and managed by the first server and the second server, and the user of the peripheral system can generate operation feedback information according to the operation state of the peripheral system. When the peripheral system is determined to be abnormal according to the operation feedback information, the main server or the corresponding processing server may send server switching information to the peripheral system to prompt a user of the peripheral system to use the peripheral system through another processing server. And meanwhile, modifying a white list of the peripheral system, or modifying the white list of the peripheral system and distributing a configuration file, so that a processing server in butt joint with the peripheral system is modified, and the normal operation of the peripheral system is ensured.
In this embodiment, when the peripheral system is abnormal, the processing server corresponding to the peripheral system is switched to ensure that the peripheral system can operate normally.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer readable instructions, which can be stored in a computer readable storage medium, and when executed, the processes of the embodiments of the methods described above can be included. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a 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, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless otherwise indicated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a traffic distribution apparatus, which corresponds to the embodiment of the method shown in fig. 2, and which can be applied to various electronic devices.
As shown in fig. 3, the traffic distribution apparatus 300 according to the present embodiment includes: a request obtaining module 301, an identifier extracting module 302, an identifier querying module 303, a file obtaining module 304, and a traffic distributing module 305, wherein:
a request obtaining module 301, configured to obtain a traffic distribution request through a pre-dispatcher.
An identifier extracting module 302, configured to extract the first distribution identifier and the 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 a traffic distribution module 305, configured to perform traffic distribution on the 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 traffic distribution request is obtained through a pre-dispatcher, which is configured specifically and is used to implement traffic distribution; extracting a first distribution identifier and a second distribution identifier for distribution judgment from the flow distribution request; acquiring a preset white list of the peripheral system, and when a first distribution identifier is inquired in the white list of the peripheral system, indicating that the flow of the peripheral system has priority, or the peripheral system is a trial system and further judgment needs to be made on flow distribution; then 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 the ordered distribution of the flow to be distributed is realized; the method and the device for judging the flow to be distributed have the advantages that the flow to be distributed is judged in multiple dimensions, and the flow distribution in multiple forms is realized.
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, when the first distribution identifier is not queried in the white list of the peripheral system, distribute, by using a pre-distributor, traffic to be distributed corresponding to the traffic distribution request to a second server.
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 normal peripheral system, and the pre-distributor may distribute the traffic to be distributed to the second server, thereby implementing 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 submodule is used for distributing the flow to be distributed to the database through the prepositive distributor to obtain the stored data.
The identification query submodule is used for querying a second distribution identification 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 processing the stored data.
In this embodiment, when the flow distribution request is triggered based on the message queue, the flow distribution request may be consumed by the front distributor, and the first/second server at the back end performs the library dropping, so that the stored data after the library dropping is processed according to the second distribution identifier, and the first server and the second server database have the same data, thereby ensuring that the processing server docked by the peripheral system can be switched.
In some optional implementations of this embodiment, when the traffic distribution request is triggered based on the timing task or based on the peripheral system interface call, the traffic distribution module 305 may further include: a second query submodule and a traffic distribution submodule, wherein:
and the second query submodule is used for querying the second distribution identifier in the distribution configuration file so as to determine the processing server corresponding to the flow to be distributed.
And the flow distribution submodule is used for distributing the flow to be distributed corresponding to the flow distribution request to the processing server through the preposed distributor.
In the embodiment, the flow distribution under the calling of the timing task and the peripheral system interface can be processed, and the implementation form of the flow distribution is enriched.
In some optional implementations of this embodiment, the traffic distribution apparatus 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 carry out 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 traffic distribution apparatus 300 further includes: feedback receiving module and 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 and modifying a white list of the peripheral system to switch the processing server corresponding to the peripheral system when the peripheral system is determined to be abnormal according to the operation feedback information.
In this embodiment, when the peripheral system is abnormal, 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 problem, an embodiment of the present application further provides a computer device. Referring to fig. 4, fig. 4 is a block diagram of a basic structure 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 is noted that only computer device 4 having components 41-43 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 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 memory Card (Flash Card), and the like, which are provided on the computer device 4. Of course, the memory 41 may also include both internal and external storage devices of the computer device 4. In this embodiment, the memory 41 is generally used for storing an operating system installed in the computer device 4 and various types of application software, such as computer readable instructions of a traffic distribution method. Further, the memory 41 may also 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 (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, for example, execute computer readable instructions of the traffic distribution method.
The network interface 43 may comprise a wireless network interface or a wired network interface, and the network interface 43 is generally used for establishing communication connection between the computer device 4 and other electronic devices.
The computer device provided in this embodiment may execute the traffic distribution method described above. The traffic distribution method here may be the traffic distribution method of each of the embodiments described above.
In this embodiment, the traffic distribution request is obtained through a pre-dispatcher, which is configured specifically and is used to implement traffic distribution; extracting a first distribution identifier and a second distribution identifier for distribution judgment from the traffic distribution request; acquiring a preset white list of the peripheral system, and when a first distribution identifier is inquired in the white list of the peripheral system, indicating that the flow of the peripheral system has priority, or the peripheral system is a trial system and further judgment needs to be made on flow distribution; then 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 the ordered distribution of the flow to be distributed is realized; the method and the device for judging the flow to be distributed have the advantages that the flow to be distributed is judged in multiple dimensions, and the flow distribution in multiple forms is realized.
The present application further provides another embodiment, which is to provide 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 the traffic distribution method as described above.
In this embodiment, the traffic distribution request is obtained through a pre-dispatcher, which is configured specifically and is used to implement traffic distribution; extracting a first distribution identifier and a second distribution identifier for distribution judgment from the traffic distribution request; acquiring a preset white list of the peripheral system, and when a first distribution identifier is inquired in the white list of the peripheral system, indicating that the flow of the peripheral system has priority, or the peripheral system is a trial system and further judgment needs to be made on flow distribution; then 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 the ordered distribution of the flow to be distributed is realized; the method and the device for judging the flow to be distributed have the advantages that the flow to be distributed is judged in multiple dimensions, and the flow distribution in multiple forms is realized.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (such as a ROM/RAM, a magnetic disk, and an optical disk), and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. A traffic distribution method, 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 white list of a peripheral system, and inquiring the first distribution identifier in the white list of the peripheral system;
when the first distribution identification is inquired in the white list of the peripheral system, a distribution configuration file is obtained;
and performing traffic distribution on the traffic to be distributed corresponding to the traffic distribution request according to the distribution configuration file and the second distribution identifier.
2. The traffic distribution method according to claim 1, wherein after the step of querying the white list of peripheral systems for the first distribution identifier, the method further comprises:
and when the first distribution identifier is not inquired in the white list of the peripheral system, distributing the traffic to be distributed corresponding to the traffic distribution request to a second server through the front distributor.
3. The traffic distribution method according to claim 1, wherein when the traffic distribution request is triggered based on a message queue, the step of performing traffic distribution on the traffic to be distributed corresponding to the traffic 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 prepositive distributor to obtain stored data;
querying the 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 processing the stored data.
4. The traffic distribution method according to claim 3, wherein when the traffic distribution request is triggered based on a timing task or based on a peripheral system interface call, the step of performing traffic distribution on the traffic to be distributed corresponding to the traffic distribution request according to the distribution configuration file and the second distribution identifier includes:
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 traffic to be distributed corresponding to the traffic distribution request to the processing server through the prepositive distributor.
5. The traffic distribution method according to claim 3, further comprising:
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.
6. The traffic distribution method according to claim 3, further comprising:
receiving operation feedback information sent by a peripheral system;
and when the peripheral system is determined to be abnormally operated according to the operation feedback information, sending server switching information to the peripheral system, and modifying the white list of the peripheral system so as to switch the processing server corresponding to the peripheral system.
7. A flow distribution apparatus, comprising:
the request acquisition module is used for acquiring a flow distribution request through the front distributor;
the identification extraction module is used for extracting a first distribution identification and a second distribution identification from the flow distribution request;
the identifier query module is used for acquiring a preset white list of the peripheral system and querying the first distribution identifier in the white list of the peripheral system;
the file acquisition module is used for acquiring a distribution configuration file when the first distribution identifier is inquired in the white list of the peripheral system;
and the traffic distribution module is used for carrying out traffic distribution on the traffic to be distributed corresponding to the traffic distribution request according to the distribution configuration file and the second distribution identifier.
8. The flow distribution apparatus of claim 7, further comprising:
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 pre-distributor when the first distribution identifier is not inquired in the white list of the peripheral system.
9. A computer device comprising a memory having computer readable instructions stored therein and a processor which when executed implements the steps of the traffic distribution method of any of claims 1 to 6.
10. A computer-readable storage medium, having computer-readable instructions stored thereon, which, when executed by a processor, implement the steps of the traffic distribution method according to any one of claims 1 to 6.
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 true CN115002218A (en) 2022-09-02
CN115002218B 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 (6)

* 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
US20210194950A1 (en) * 2017-09-12 2021-06-24 Wangsu Science & Technology Co., Ltd. File distribution and download method, distribution server, client terminal and system
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210194950A1 (en) * 2017-09-12 2021-06-24 Wangsu Science & Technology Co., Ltd. File distribution and download method, distribution server, client terminal and system
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
杨敏;何海涛;赵琼;: "流量大数据安全分析平台的设计与实现", 通信学报, no. 1, pages 110 - 115 *

Also Published As

Publication number Publication date
CN115002218B (en) 2023-08-04

Similar Documents

Publication Publication Date Title
CN107993149B (en) Account information management method, system and readable storage medium
EP3534320A1 (en) Block chain-based multi-chain management method and system, electronic device, and storage medium
CN102202289B (en) Method and system for remote calling software and hardware resources through mobile terminal
CN106549933B (en) Data transmission system and method of block chain
CN112291376B (en) Data processing method and related equipment in block chain system
CN112217793B (en) Cross-system trust management system suitable for power Internet of things
CN108022090B (en) Virtual account management method, device, system and readable storage medium
CN110839071B (en) Information storage method, device and storage medium based on block chain
CN108833610B (en) Information updating method, device and system
WO2020248768A1 (en) Method and apparatus for managing application program service
LU102556B1 (en) Blockchain-enhanced open internet of things access architecture
CN111538757B (en) Data storage method, query method, device, server and medium
CN111698315A (en) Data processing method and device for block and computer equipment
CN103092645A (en) Geographic spatial information application system and implement method thereof based on microkernel technology
CN112468409A (en) Access control method, device, computer equipment and storage medium
CN111932250A (en) Method for realizing power grid information sharing based on block chain technology
CN109298937A (en) Document analysis method and the network equipment
CN115859362A (en) Data storage system, method, device and medium based on block chain side chain
US20070050447A1 (en) Method and device arrangement for managing a client/server environment
CN115567594A (en) Microservice request processing method, microservice request processing device, computer equipment and storage medium
US8037160B2 (en) Method and device arrangement for managing a user application/device management server/client device environment
CN108520401B (en) User list management method, device, platform and storage medium
CN102137102B (en) Realizing method of service supporting platform for supporting multiclass information publishing modes
CN111291045A (en) Service isolation data transmission method and device, computer equipment and storage medium
CN115002218B (en) Traffic distribution method, traffic distribution device, computer 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