CN113660172B - Flow control method and device - Google Patents

Flow control method and device Download PDF

Info

Publication number
CN113660172B
CN113660172B CN202110896724.9A CN202110896724A CN113660172B CN 113660172 B CN113660172 B CN 113660172B CN 202110896724 A CN202110896724 A CN 202110896724A CN 113660172 B CN113660172 B CN 113660172B
Authority
CN
China
Prior art keywords
message
processed
order
flow control
target system
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
CN202110896724.9A
Other languages
Chinese (zh)
Other versions
CN113660172A (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.)
Shanghai Wanwu Xinsheng Environmental Technology Group Co
Original Assignee
Shanghai Wanwu Xinsheng Environmental Technology Group Co
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 Shanghai Wanwu Xinsheng Environmental Technology Group Co filed Critical Shanghai Wanwu Xinsheng Environmental Technology Group Co
Priority to CN202110896724.9A priority Critical patent/CN113660172B/en
Publication of CN113660172A publication Critical patent/CN113660172A/en
Application granted granted Critical
Publication of CN113660172B publication Critical patent/CN113660172B/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
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/20Traffic policing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS

Abstract

The embodiment of the application provides a flow control method and device, after a message to be processed is acquired, the solution queries a flow control result related to the message to be processed in a cache, if the flow control result related to the message to be processed is not queried, the solution indicates that the homologous message of the message to be processed is not subjected to flow control, whether the type of the message to be processed is an creation type can be further judged, different judgment results can be processed differently based on the message to be processed, and therefore processing logic for controlling the flow is realized, and the problem that the new system cannot process partial flow caused by distributing the homologous flow to different systems while ensuring flow distribution of gray level test is avoided.

Description

Flow control method and device
Technical Field
The present disclosure relates to the field of information technologies, and in particular, to a flow control method and apparatus.
Background
With the expansion and increase of service systems, the need for modifying the service systems arises, and in the modification process, a part of traffic generally needs to be filtered out to perform gray level test on the modified service systems so as to verify whether a new system has a problem. At present, the flow control mode is more stand-alone in gray level test, and flow is generally controlled according to the filtering rule only, namely, the flow is directly forwarded to the new system for processing according to the filtering rule, and the flow is still forwarded to the old version for processing not according with the filtering rule.
However, this approach is not applicable to all internet traffic scenarios. As in order service systems, since the entire performance of an order is procedural, including placing an order, paying, sorting, shipping, receiving, order confirmation, etc. The whole process has a long period, so that in the case of two systems simultaneously, it is necessary to ensure that the order goes through one system. If an order is created in the new system, subsequent messages regarding the order need to be processed by the new system, whereas if an order is created in the old system, subsequent messages regarding the order need to be processed by the old system. The current flow control method simply based on the filtering rule is equivalent to simply classifying at the entrance of the new and old systems once, which may make the subsequent order message of the order created in the old system be transferred to the new system, and the new system cannot process the transferred subsequent order message due to the lack of necessary information about the order.
In summary, the current flow control method used in gray scale test is not suitable for the service scenario where the homologous flow exists in front-to-back association, which may cause that the new system cannot process part of the flow.
Disclosure of Invention
An objective of the present application is to provide a flow control method and apparatus, so as to solve the technical problem that the existing flow control method is not suitable for the service scenario where the homologous flow exists in front and back association.
To achieve the above object, an embodiment of the present application provides a flow control method, including:
acquiring a message to be processed, and inquiring a flow control result about the message to be processed in a cache;
if the flow control result related to the message to be processed is not queried, judging whether the type of the message to be processed is a creation type;
if the type of the message to be processed is the creation type, distributing a target system of the message to be processed according to a preset filtering rule, writing the distribution result into the cache as a flow control result of the message to be processed, and sending the message to be processed to the target system;
if the type of the message to be processed is a non-creation type, determining a homologous system corresponding to the message to be processed as a target system, and sending the message to be processed to the target system, wherein the homologous system is a system in which the homologous message corresponding to the message to be processed is sent, and the homologous message is the same message as the source of the message to be processed;
if the flow control result related to the message to be processed is queried, determining a target system of the message to be processed from the flow control result, and sending the message to be processed to the target system.
Further, the target system includes a new system and an old system.
Further, the target system for distributing the message to be processed according to a preset filtering rule comprises:
acquiring the association information of the message to be processed, and matching the association information with a preset filtering rule;
if the filtering rule is hit, determining a new system as a target system of the message to be processed;
and if the filtering rule is not hit, determining the old system as the target system of the message to be processed.
Further, writing the allocation result into the buffer as a flow control result of the message to be processed, including:
and determining the source identifier of the message to be processed, and writing the message to be processed and the target system allocated to the message to be processed into the cache so as to establish a mapping relationship between the source identifier of the message to be processed and the target system.
Further, the pending message is an order message, the creation type of order message includes an order creation message for creating an order in the target system, and the non-creation type of order message includes other messages for performing secondary operations on the created order in the target system.
Further, the filtering rule includes at least any one of:
the modular result of the order mark of the order message accords with a first preset condition;
the number of messages allocated to the target system meets a second preset condition;
the user identification of the order message meets a third preset condition.
Further, the caches are individually packaged in a toolkit.
Further, obtaining the message to be processed includes:
and acquiring the message to be processed sent by the mechanism based on the message queue.
Some embodiments of the present application also provide a flow control device, wherein the device comprises a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the device to perform the aforementioned flow control method.
Still further embodiments of the present application provide a computer readable medium having stored thereon computer program instructions executable by a processor to implement the flow control method.
Compared with the prior art, after the flow control scheme provided by the embodiment of the invention acquires the message to be processed, the flow control result related to the message to be processed is firstly queried in the cache, if the flow control result related to the message to be processed is not queried, the flow control is not performed on the homologous message of the message to be processed, and whether the type of the message to be processed is the creation type can be further judged; if the type of the message to be processed is the creation type, the message to be processed is the first message in the homologous messages which are related in front-back, the message to be processed is distributed to a new system, the target system of the message to be processed is distributed according to a preset filtering rule, and meanwhile, the distribution result is written into the cache as a flow control result of the message to be processed, so that the cache is updated, and the subsequent message to be processed is conveniently processed. If the type of the message to be processed is a non-creation type, the message to be processed is not the first message in the homologous messages which are related in front-back, the homologous system corresponding to the message to be processed needs to be determined as a target system, and the target system is sent to the same system for processing; if the flow control result of the message to be processed is queried in the cache, the flow control is performed on the homologous message of the message to be processed, the target system of the message to be processed is determined from the flow control result, and the target system is sent to the same system for processing. Therefore, through the control logic in the scheme, the problem that the new system cannot process part of traffic due to the fact that the homologous traffic is distributed to different systems can be avoided while traffic distribution of gray scale test is ensured.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings, in which:
fig. 1 is a process flow diagram of a flow control method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a framework when the solution provided in the embodiment of the present application is applied to an order service scenario;
FIG. 3 is a flow chart of a system employing the architecture shown in FIG. 2 in implementing flow control of order messages in an embodiment of the present application;
the same or similar reference numbers in the drawings refer to the same or similar parts.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
In a typical configuration of the present application, the terminals, the devices of the services network each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer-readable media include both permanent and non-permanent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer program instructions, data structures, modules of the program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device.
The flow control method is applied to flow control between a new system and an old system in gray scale test. In some business scenarios, the multiple messages that the business system needs to process may have the same source, for example, in the e-commerce field, the new and old order business systems when performing gray level test may receive processing messages of different stages related to a certain order, such as an order creation message, an order cancellation message, an order payment message, an order shipment message, etc., where the messages are common to all processes for the same order, and may be considered to have the same source, all based on the same order, and belong to homologous messages. Also, in the field of data storage, new and old database systems may receive processing messages at different stages of a certain data, such as a message for creating a data record, a message for modifying a data record, a message for deleting a data record, etc., which are all common to the same data record, and may also be the same in source and belong to a same source message.
Because the new system and the old system are mutually independent, the method belongs to an isolation environment for the message processing process, and if homologous messages in different processing stages are respectively processed in the new system and the old system, the homologous messages in the later processing stages of the system can be caused to fail to be processed due to the lack of pre-arranged data. For example, if a creation message of an order is distributed to an old system for processing according to a filtering rule, or the creation of the order is already completed in the old system before the gray scale test is performed on the order, when an order payment message of the order is generated, the creation message is distributed to a new system for processing, and processing failure is caused by lack of related data about the creation of the order in the new system.
The message to be processed by the scheme in the embodiment of the application is the homologous message, and by setting reasonable control logic at the entrance of the flow entering the new system and the old system, the problem that the new system cannot process partial flow caused by the fact that the homologous flow is distributed to different systems while the flow distribution of the gray test can be ensured.
In a practical scenario, the execution subject of the method may be a user device, a network device, or a device formed by integrating the user device and the network device through a network, or may be an application running on the device. The user equipment comprises, but is not limited to, various terminal equipment such as computers, mobile phones, tablet computers and the like; the network device includes, but is not limited to, an implementation such as a network host, a single network server, a set of multiple network servers, or a set of computers based on cloud computing. Here, the Cloud is composed of a large number of hosts or web servers based on Cloud Computing (Cloud Computing), which is a kind of distributed Computing, one virtual computer composed of a group of loosely coupled computer sets. The execution subject of the method may be a program that runs on the above-described device, and may be implemented as a flow control module, a module, or the like, for example. Fig. 1 shows a process flow of a flow control method according to an embodiment of the present application, where the flow control method is applied to flow control between a new system and an old system during gray scale test, and includes at least the following steps:
step S101, obtaining a message to be processed, and inquiring a flow control result about the message to be processed in a cache. The message to be processed refers to a message to be processed in a flow control process, and takes an order service scene as an example, the message to be processed can be a message of order creation, order payment, order modification, order shipment, order completion and the like, and corresponds to each stage of order processing. Before entering the order service system, the messages can be subjected to flow control at the entrance to realize the distribution of the messages to be processed. In a practical scenario, the messages to be processed may interact based on the mechanism of the message queue.
The cache stores the flow control result of the message to be processed, the flow control result of the message to be processed may be an allocation result of a homologous message of the message to be processed, for example, if the message to be processed acquired this time is a payment message of the order a1, the homologous message may be a creation message of the order a1, and the cache may store the flow control result of the creation message of the order a1, that is, the allocation result of the creation message of the order a 1. If the allocation result of the creation message of the order a1 is stored in the cache, the cache can be hit, and the flow control result related to the message to be processed is queried in the cache, otherwise, the flow control result cannot be queried, and for different query results, the subsequent processing can be performed in different modes.
Step S102, if the flow control result related to the message to be processed is not queried, judging whether the type of the message to be processed is a creation type.
And when the flow control result related to the message to be processed is not queried, the fact that the message to be processed at this time does not have the same source message to be subjected to flow control through the scheme of the embodiment is indicated, namely the message to be processed at this time is the first message for flow control through the scheme in all the same source messages. Possible reasons for this include at least two: 1. the type of the message to be processed is the creation type, namely the creation message of the first stage in the homologous message; 2. the message to be processed is not of the creation type, but the new system for gray level testing has not been accessed before the homologous message of the previous stage of the message to be processed arrives, and all the homologous messages of the previous stage have been processed by the old system.
Thus, this step needs to distinguish between these two cases, and thus needs to further determine whether the type of the message to be processed is a creation type. Taking the foregoing order service scenario as an example, the pending message is an order message, the creation type of order message includes an order creation message for creating an order in the target system, and the non-creation type of order message includes other messages for performing secondary operations on the created order in the target system. When the flow control result of the payment message about the order a1 is not queried in the cache, it is further required to determine whether the type of the payment message of the order a1 is not the creation type, and it is obvious that the type of the payment message of the order a1 is the payment type, belongs to the non-creation type, and is not the creation type. For different judgment results, the processing procedures in the subsequent step S103 and step S104 may be executed, respectively.
Step S103, if the type of the message to be processed is the creation type, distributing a target system of the message to be processed according to a preset filtering rule, writing the distribution result into the cache as a flow control result of the message to be processed, and sending the message to be processed to the target system.
When the target system of the message to be processed is distributed according to a preset filtering rule, the associated information of the message to be processed can be obtained, the associated information is matched with the preset filtering rule, if the filtering rule is hit, a new system is determined as the target system of the message to be processed, and if the filtering rule is not hit, an old system is determined as the target system of the message to be processed. The message to be processed may then be sent to the determined target system, where the message to be processed is processed, e.g., when the determined target system is a new system, the message to be processed is sent to the new system for processing, and when the determined target system is an old system, the message to be processed is sent to the old system for processing.
The association information of the message to be processed may be any information which is associated with the message to be processed and can be used for rule matching, and may be derived from information carried by the message to be processed, such as order identification such as order number, user identification of the order, and the current state of the flow control process in which the message to be processed participates, such as the number of messages which have been distributed to a new system or system through the scheme of the embodiment. Thus, the preset filtering rules in the embodiments of the present application may include at least any one of the following:
the order identification of the order message has a modulo result that meets a first preset condition, for example, when the order is identified as a digital order number, the order number may be modulo-2, and then the modulo result is set to be 1 as the first preset condition, so that the order of the order number 202107272134771 will hit the filtering rule, whereas the order of the order number 202107272135668 will miss the filtering rule due to the modulo result being 0.
The number of messages allocated to the target system meets the second preset condition, and in this embodiment, the target system for allocating traffic includes a new system and an old system, and it may be determined whether the second preset condition is met based on the number of messages allocated to a certain target system (e.g., the new system). If the second preset condition set in the implementation is less than or equal to 1000, when the number of the messages allocated to the target system is less than 1000, the messages to be processed at this time hit the filtering rule.
The user identification of the order message accords with a third preset condition, the user identification can be a user name, a user number and the like, and a part of orders generated by users can be designated to enter a new system through the filtering rule, for example, the last position of the user number is a designated number, and the user name contains a certain designated character and the like.
It will be appreciated by those skilled in the art that the specific details of the filtering rules are given by way of example only, and that other forms of similar principles, whether existing or hereafter developed, are intended to be encompassed within the scope of the present application if applicable to the present application and are incorporated herein by reference.
After the target system of the message to be processed is allocated according to the preset filtering rule, the allocation result may be written into the cache as the flow control result of the message to be processed, so as to update the content in the cache, so as to be used for the query processing in the step S101. In order to enable the query to be more efficient and accurate, when the allocation result is written into the cache as the flow control result of the message to be processed, the scheme of the embodiment of the application can firstly determine the source identifier of the message to be processed, and write the message to be processed and the target system allocated to the message to be processed into the cache so as to establish the mapping relationship between the source identifier of the message to be processed and the target system. For example, for an order service scenario, its source identification may be set to the order identification, whereby messages with the same order identification may be considered homologous messages, such as creation messages for order a2, payment messages, shipment messages, etc.
And writing the message to be processed and the target system allocated to the message to be processed into the cache so as to establish a mapping relation between the source identifier of the message to be processed and the target system. For example, if the current message to be processed is a creation message of the order a2, and the target system of the message to be processed is allocated as a new system according to a preset filtering rule, the order number 202107272134771 of the order a2 may be obtained, and then the creation message of the order a2 and the allocated target system thereof may be written into a cache, so as to establish a mapping relationship between the source identifier 202107272134771 of the order a2 and the new system. Thus, in the foregoing step S101, all subsequent homologous messages about the order with order number 202107272134771 can query the buffer for the corresponding flow control result.
In a practical scenario, the cache may be implemented by any cache tool existing in the market, such as dis (Remote Dictionary Server, remote dictionary service), and the cache may be separately packaged in a tool kit, without being configured by a caller of the solution, so that implementation of the solution may be more convenient.
Step S104, if the type of the message to be processed is a non-creation type, determining a homologous system corresponding to the message to be processed as a target system, and sending the message to be processed to the target system.
The homologous system is a system that homologous information corresponding to the information to be processed is sent, and the homologous information is the information with the same source as the information to be processed. If a message to be processed does not find out the corresponding flow control result in the cache and the type is a non-creation type, the message to be processed needs to be sent to a system for processing the homologous message of the message to be processed, so that the target system is ensured not to have necessary data and not to be lost when processing the message, and the situation that the message cannot be processed is avoided. For example, for the foregoing payment message of the order a1, if the homologous message (the creation message of the order a 1) is processed by the old system, that is, the homologous system is the old system, the old system may determine that the old system is the target system, and the message to be processed is sent to the old system and is processed by the old system.
Step S105, if the flow control result related to the message to be processed is queried, determining a target system of the message to be processed from the flow control result, and sending the message to be processed to the target system.
When the flow control result of the message to be processed is queried, the distribution result of the homologous message which has been subjected to flow control before can be determined, and thus the target system of the message to be processed can be determined according to the distribution result. For example, taking the foregoing payment message of the order a1 as an example, if the buffer stores the allocation result of "the creation message of the order a1 with the order number 202107272199832 has been allocated to the new system by the flow control", the allocation result is the flow control result of the payment message related to the order a 1. At this time, the new system is also determined as the target system of the payment message of the order a1, and is sent to the new system for processing. Otherwise, if the information stored in the cache points to the target system of the payment message of the order a1, the payment message of the order a1 is sent to the old system and is processed by the old system.
Therefore, through the control logic, the problem that the new system cannot process part of traffic due to the fact that the homologous traffic is distributed to different systems can be avoided while traffic distribution of gray level test is ensured, and normal operation of a service system during gray level test is ensured.
Fig. 2 shows a framework when the solution provided in the embodiment of the present application is applied to an order service scenario, where an order Message is generated based on user behaviors involved in a transaction, for example, an order creation Message corresponds to an order placing behavior of a buyer user, an order payment Message corresponds to a payment behavior of the buyer user, an order cancellation Message corresponds to a cancel order behavior of the buyer user, an order shipment Message corresponds to a shipping behavior of a seller user, and the like, and the order Message is transmitted by a mechanism of MQ (Message Queue).
The flow control scheme in the embodiment of the application can be implemented as a flow control component, and the flow control component comprises a rule manager, a flow controller and a cache manager, wherein the rule manager is used for managing preset filtering rules, realizing functions of configuration, judgment and the like of the filtering rules, the flow controller is used for controlling flow direction of order information, realizing flow distribution, and the cache manager is used for managing stored content, realizing functions of cache inquiry and the like. The target systems available for processing the order message include both the new system and the old system, both of which may include various subsystems required to effect the order service processing, such as an order taking system, an order center, a delivery system, a payment system, an order production system, and the like.
When the system of the framework realizes the flow control of the order message, the flow is shown in fig. 3, and at least the following steps are included:
in step S301, the flow of the order message enters the flow control component.
In step S302, the flow control component queries the cache for the presence of flow control results for the order message.
Step S303, the flow control component judges whether the cache is hit or not, if the cache is hit, step S307 is executed according to the information stored in the cache, and the new system or the old system is used for processing; if the cache is not hit, step S304 is performed.
In step S304, the flow control component determines whether the order message is of a create type. If the creation type is the creation type, continuing to execute the step S305; if not, step S307 is performed, where the old system processes.
Step S305, based on the association information of the order message, the rule manager matches according to the filtering rule, determines whether to be allocated to the new system or the old system, executes the corresponding step, and processes the new system or the old system.
And step S306, writing the allocation result into the cache as a flow control result of the order message.
Step S307, the order message is controlled to enter the new system or the old system, the new system or the old system processes the order message, and the processing result is returned.
When the method is applied to an order service scene, the order information firstly passes through the flow control component to determine the system needing to enter before entering the service system, and if the order information is the information of the same order, even if the filtering rule is changed, the processing of the subsequent information of the order is not affected. In addition, the processing mode can also be applied to other scenes except order service, such as an environment isolation scene of any homologous data.
The embodiments of the present application also provide a flow control device, which includes a memory for storing computer program instructions and a processor for executing the computer program instructions, where the computer program instructions, when executed by the processor, trigger the device to implement the methods and/or technical solutions of the embodiments of the present application described above.
In particular, the methods and/or embodiments of the present application may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. The above-described functions defined in the method of the present application are performed when the computer program is executed by a processing unit.
It should be noted that, the computer readable medium described in the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
In the present application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present application may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowchart or block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of devices, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As another aspect, the present application also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more computer program instructions executable by a processor to implement the methods and/or aspects of the various embodiments of the present application described above.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, using Application Specific Integrated Circuits (ASIC), a general purpose computer or any other similar hardware device. In some embodiments, the software programs of the present application may be executed by a processor to implement the above steps or functions. Likewise, the software programs of the present application (including associated data structures) may be stored on a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. In addition, some steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the apparatus claims can also be implemented by means of one unit or means in software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.

Claims (8)

1. A method of flow control, the method comprising:
acquiring a message to be processed, and inquiring a flow control result about the message to be processed in a cache;
if the flow control result related to the message to be processed is not queried, judging whether the type of the message to be processed is a creation type;
if the type of the message to be processed is a creation type, distributing a target system of the message to be processed according to a preset filtering rule, writing a distribution result into the cache as a flow control result of the message to be processed, and sending the message to be processed to the target system, wherein the target system is a new system or an old system, the message to be processed is an order message, and the order message of the creation type comprises an order creation message for creating an order in the target system;
if the type of the message to be processed is a non-creation type, determining a homologous system corresponding to the message to be processed as a target system, and sending the message to be processed to the target system, wherein the homologous system is a system in which the homologous message corresponding to the message to be processed is sent, the homologous message is the same as the source of the message to be processed, and the non-creation type order message comprises other messages for performing secondary operation on the created order in the target system;
if the flow control result related to the message to be processed is queried, determining a target system of the message to be processed from the flow control result, and sending the message to be processed to the target system.
2. The method according to claim 1, wherein the target system for distributing the message to be processed according to a preset filtering rule comprises:
acquiring the association information of the message to be processed, and matching the association information with a preset filtering rule;
if the filtering rule is hit, determining a new system as a target system of the message to be processed;
and if the filtering rule is not hit, determining the old system as the target system of the message to be processed.
3. The method of claim 1, wherein writing the allocation result as a flow control result of the pending message to the cache comprises:
and determining the source identifier of the message to be processed, and writing the message to be processed and the target system allocated to the message to be processed into the cache so as to establish a mapping relationship between the source identifier of the message to be processed and the target system.
4. The method of claim 1, wherein the filtering rules comprise at least any one of:
the modular result of the order mark of the order message accords with a first preset condition;
the number of messages allocated to the target system meets a second preset condition;
the user identification of the order message meets a third preset condition.
5. The method of claim 1, wherein the cache is packaged separately in a toolkit.
6. The method of claim 1, wherein obtaining the message to be processed comprises:
and acquiring the message to be processed sent by the mechanism based on the message queue.
7. A flow control device, wherein the device comprises a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein the computer program instructions, when executed by the processor, trigger the device to perform the method of any one of claims 1 to 6.
8. A computer readable medium having stored thereon computer program instructions executable by a processor to implement the method of any of claims 1 to 6.
CN202110896724.9A 2021-08-05 2021-08-05 Flow control method and device Active CN113660172B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110896724.9A CN113660172B (en) 2021-08-05 2021-08-05 Flow control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110896724.9A CN113660172B (en) 2021-08-05 2021-08-05 Flow control method and device

Publications (2)

Publication Number Publication Date
CN113660172A CN113660172A (en) 2021-11-16
CN113660172B true CN113660172B (en) 2023-06-30

Family

ID=78478446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110896724.9A Active CN113660172B (en) 2021-08-05 2021-08-05 Flow control method and device

Country Status (1)

Country Link
CN (1) CN113660172B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111953721A (en) * 2019-05-16 2020-11-17 北京京东尚科信息技术有限公司 Access flow control method and device
CN112819493A (en) * 2019-11-15 2021-05-18 北京京东尚科信息技术有限公司 Message processing method, system thereof, computer system and computer readable medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060250970A1 (en) * 2005-05-09 2006-11-09 International Business Machines Corporation Method and apparatus for managing capacity utilization estimation of a data center
US11392873B2 (en) * 2015-06-30 2022-07-19 Level 3 Communications, Llc Systems and methods for simulating orders and workflows in an order entry and management system to test order scenarios

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111953721A (en) * 2019-05-16 2020-11-17 北京京东尚科信息技术有限公司 Access flow control method and device
CN112819493A (en) * 2019-11-15 2021-05-18 北京京东尚科信息技术有限公司 Message processing method, system thereof, computer system and computer readable medium

Also Published As

Publication number Publication date
CN113660172A (en) 2021-11-16

Similar Documents

Publication Publication Date Title
US20210326187A1 (en) Systems and method for managing memory resources used by smart contracts of a blockchain
EP3591510A1 (en) Method and device for writing service data in block chain system
CN105579971B (en) The detection of express passway user's space RDMA resource error
US10437708B2 (en) System for refreshing and sanitizing testing data in a low-level environment
US11144213B2 (en) Providing preferential access to a metadata track in two track writes
CN110716845B (en) Log information reading method of Android system
CN105760111A (en) Random Read Performance Of Optical Media Library
CN111459948B (en) Transaction integrity verification method based on centralized block chain type account book
CN111324441A (en) Operating environment switching method and device, computer equipment and storage medium
CN111444216A (en) Data block deleting method based on centralized block chain type account book
CN113656307A (en) System capacity evaluation method, device, equipment and medium
US20180136998A1 (en) Testing a data coherency algorithm
CN113660172B (en) Flow control method and device
US10795824B2 (en) Speculative data return concurrent to an exclusive invalidate request
US20190179754A1 (en) Memory barriers in a coherence directory
US10788991B2 (en) Managing program access to data storage resources
US20210240516A1 (en) Distributed transaction management
CN111369282B (en) Resource processing method and device
US20200294057A1 (en) Business processing method, apparatus, and equipment
CN109903161B (en) Object processing method, device, equipment and medium based on block chain
CN112749175A (en) Transaction processing method and device, electronic device and medium
CN111260411A (en) Resource processing method and device
US11567925B2 (en) Concurrent update management
US10733103B2 (en) Non-blocking directory-based cache coherence
CN110874354A (en) Database migration method and device, electronic equipment and storage medium

Legal Events

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