
技术领域technical field
本发明涉及信息技术领域,尤其涉及一种数据分配方法。The invention relates to the field of information technology, in particular to a data distribution method.
背景技术Background technique
随着互联网的发展,利用互联网进行数据的传递和分配已经是较为常见的做法了。企业利用特定的服务器按照一定的规则,对数据进行存储和分发,能够实现对数据的统一管理。With the development of the Internet, it has become a common practice to use the Internet to transmit and distribute data. Enterprises use specific servers to store and distribute data according to certain rules, which can realize unified management of data.
但是,随着分布式设备的大量出现,数据的存储方式发生着变化,从原有的服务器集中存储转变为分布式存储,大幅度地减小了服务器的存储压力和成本。However, with the emergence of a large number of distributed devices, the storage method of data has changed, from the original centralized storage of servers to distributed storage, which greatly reduces the storage pressure and cost of servers.
然而,如果需要对分布式存储的数据进行高效和精确的管理,则对数据的管理技术和能力提出了很大挑战。However, if the distributed stored data needs to be managed efficiently and accurately, it poses a great challenge to the data management technology and capability.
发明内容SUMMARY OF THE INVENTION
针对上述问题,本发明提出了一种数据分配方法,其中,将待分配数据预存在多个数据队列中,并形成关于每个所述数据队列的存储情况的队列资源记录表;In view of the above problems, the present invention proposes a data allocation method, wherein the data to be allocated is pre-stored in a plurality of data queues, and a queue resource record table about the storage situation of each of the data queues is formed;
每个所述数据队列具有对应的路由地址,形成一路由地址列表;Each of the data queues has a corresponding routing address, forming a routing address list;
还包括:Also includes:
步骤S1,获取用户的数据请求;Step S1, obtain the data request of the user;
步骤S2,根据所述数据请求,按照一预设的路由地址选择规则从所述队列资源记录表中选中相应的所述数据队列;Step S2, according to the data request, select the corresponding data queue from the queue resource record table according to a preset routing address selection rule;
步骤S3,判断选中的所述数据队列是否完全满足所述数据请求;Step S3, judging whether the selected data queue fully satisfies the data request;
若是,则转向步骤S4;若否,则转向步骤S6;If yes, go to step S4; if not, go to step S6;
步骤S4,将所述数据队列中的所述待分配数据取出;Step S4, taking out the data to be allocated in the data queue;
步骤S5,根据所述待分配数据的取出情况对所述路由地址选择规则中的参数进行更新;Step S5, updating the parameters in the routing address selection rule according to the fetching situation of the data to be allocated;
步骤S6,结束。Step S6, end.
上述的数据分配方法,其中,所述待分配数据为电子券数据。In the above data distribution method, the data to be distributed is electronic coupon data.
上述的数据分配方法,其中,所述路由地址选择规则具体为:The above data distribution method, wherein, the routing address selection rule is specifically:
关于每个所述数据队列的路由地址形成有一选择权重集合,所述选择权重集合中记录有对应每个所述路由地址的选择权重值;A selection weight set is formed with respect to the routing address of each of the data queues, and a selection weight value corresponding to each of the routing addresses is recorded in the selection weight set;
所述步骤S5中,对所述路由地址选择规则中的参数进行更新,具体为对相关的所述路由地址的所述选择权重值进行更新。In the step S5, the parameters in the routing address selection rule are updated, specifically, the selection weight value of the relevant routing address is updated.
上述的数据分配方法,其中,所述步骤S3中,具体的判断规则为:The above data distribution method, wherein, in the step S3, the specific judgment rule is:
判断选中的所述数据队列中的所述待分配数据的数量是否满足所述数据请求。It is judged whether the quantity of the data to be allocated in the selected data queue satisfies the data request.
上述的数据分配方法,其中,所述待分配数据具有多个类别;The above data allocation method, wherein the data to be allocated has multiple categories;
相同类别的所述待分配数据存储在同一所述数据队列中。The to-be-allocated data of the same category are stored in the same data queue.
上述的数据分配方法,其中,所述路由地址为路由器设备的IP地址。In the above data distribution method, the routing address is an IP address of a router device.
上述的数据分配方法,其中,通过对包含所述待分配数据的数据文件进行解析后,将解析得到的所述待分配数据预存在多个所述数据队列中。In the above data distribution method, after parsing a data file containing the data to be allocated, the data to be allocated obtained by the analysis is pre-stored in a plurality of the data queues.
上述的数据分配方法,其中,解析得到的所述数据文件记录在一数据库中;The above-mentioned data distribution method, wherein, the data file obtained by analysis is recorded in a database;
所述步骤S5中,还根据所述待分配数据的取出情况对所述数据库进行更新。In the step S5, the database is also updated according to the fetching situation of the data to be allocated.
上述的数据分配方法,其中,关于每个所述数据队列的存储情况的所述队列资源记录表中具体包括:The above-mentioned data allocation method, wherein, the queue resource record table about the storage situation of each of the data queues specifically includes:
所述数据队列的数量信息,和/或位置信息,和/或优先级信息,和/或存储信息类型信息,和/或存储限制信息。Quantity information of the data queues, and/or location information, and/or priority information, and/or storage information type information, and/or storage restriction information.
上述的数据分配方法,其中,所述待分配数据按照一预设存储规则预存在多个所述数据队列中;The above data allocation method, wherein the data to be allocated is pre-stored in a plurality of the data queues according to a preset storage rule;
所述预设存储规则为:随机存储,或顺序存储,或按优先级顺序存储。The preset storage rules are: random storage, or sequential storage, or storage in priority order.
有益效果:本发明提出的一种数据分配方法,能够对分布式的待分配数据进行高效和精确的管理,可靠性高。Beneficial effects: The data distribution method proposed by the present invention can efficiently and accurately manage distributed data to be distributed, and has high reliability.
附图说明Description of drawings
图1为本发明一实施例中数据分配方法的步骤流程图。FIG. 1 is a flow chart of steps of a data distribution method in an embodiment of the present invention.
具体实施方式Detailed ways
下面结合附图和实施例对本发明进行进一步说明。The present invention will be further described below with reference to the accompanying drawings and embodiments.
在一个较佳的实施例中,如图1所示,提出了一种数据分配方法,其中,将待分配数据预存在多个数据队列中,并形成关于每个数据队列的存储情况的队列资源记录表;In a preferred embodiment, as shown in FIG. 1, a data allocation method is proposed, in which the data to be allocated is pre-stored in a plurality of data queues, and a queue resource about the storage situation of each data queue is formed recording sheet;
每个数据队列具有对应的路由地址,形成一路由地址列表;Each data queue has a corresponding routing address, forming a routing address list;
还可以包括:Can also include:
步骤S1,获取用户的数据请求;Step S1, obtain the data request of the user;
步骤S2,根据数据请求,按照一预设的路由地址选择规则从队列资源记录表中选中相应的数据队列;Step S2, according to the data request, select the corresponding data queue from the queue resource record table according to a preset routing address selection rule;
步骤S3,判断选中的数据队列是否完全满足数据请求;Step S3, judging whether the selected data queue fully satisfies the data request;
若是,则转向步骤S4;若否,则转向步骤S6;If yes, go to step S4; if not, go to step S6;
步骤S4,将数据队列中的待分配数据取出;Step S4, taking out the data to be allocated in the data queue;
步骤S5,根据待分配数据的取出情况对路由地址选择规则中的参数进行更新;Step S5, update the parameters in the routing address selection rule according to the fetching situation of the data to be allocated;
步骤S6,结束。Step S6, end.
上述技术方案中,待分配数据应为具有不同标识的数据,例如为互不相同的代码数据或编码数据;用户发起数据请求后,用于分配的服务器可以按照数据请求的内容,将相应的待分配数据分配给发起数据请求的用户或指定的用户;由于待分配数据的数量一般是固定的,或者同一种类的待分配数据只发行固定的数量,因此每分配一个待分配数据后,需要将该待分配数据从待分配的行列中删除,从而避免对同一个待分配数据进行重复分配;由于不同的用户具有的路由地址一般不同,因此,需要将不同的待分配数据存储在对应不同路由地址的数据队列,在取出时则可以从相关数据队列中取出对应数量的待分配数据;具体的数据传输过程是本领域的惯用技术手段,在此不再赘述;队列资源记录表一般是动态的,并且还可以记录关于数据队列的存储情况的各种附加信息或数据。In the above technical solution, the data to be distributed should be data with different identifiers, such as code data or encoded data that are different from each other; after the user initiates a data request, the server for distribution may, according to the content of the data request, convert the corresponding data to be distributed. The allocated data is allocated to the user who initiates the data request or to the designated user; since the quantity of data to be allocated is generally fixed, or only a fixed amount of data to be allocated of the same type is issued, after each allocation of data to be allocated, it is necessary to The data to be allocated is deleted from the ranks to be allocated, so as to avoid the repeated allocation of the same data to be allocated; since different users generally have different routing addresses, it is necessary to store different data to be allocated in different routing addresses. Data queue, when taking out, the corresponding amount of data to be allocated can be taken out from the relevant data queue; the specific data transmission process is a common technical means in the field, and will not be repeated here; the queue resource record table is generally dynamic, and Various additional information or data about the storage situation of the data queue may also be recorded.
在一个较佳的实施例中,待分配数据可以为电子券数据,具体地可以为电子券编码数据。In a preferred embodiment, the data to be allocated may be electronic coupon data, specifically, electronic coupon coding data.
在一个较佳的实施例中,路由地址选择规则具体为:In a preferred embodiment, the routing address selection rule is specifically:
关于每个数据队列的路由地址形成有一选择权重集合,选择权重集合中记录有对应每个路由地址的选择权重值;The routing address of each data queue forms a selection weight set, and the selection weight set records the selection weight value corresponding to each routing address;
步骤S5中,对路由地址选择规则中的参数进行更新,具体为对相关的路由地址的选择权重值进行更新。In step S5, the parameters in the routing address selection rule are updated, specifically, the selection weight value of the relevant routing address is updated.
上述技术方案中,选择权重集合可以是列表或神经网络的形式,一般选择权重值大的路由地址优先得到分配。In the above technical solution, the selection weight set may be in the form of a list or a neural network. Generally, a routing address with a larger weight value is selected to be assigned first.
在一个较佳的实施例中,步骤S3中,具体的判断规则为:In a preferred embodiment, in step S3, the specific judgment rule is:
判断选中的数据队列中的待分配数据的数量是否满足数据请求。It is judged whether the quantity of data to be allocated in the selected data queue satisfies the data request.
上述技术方案中,该待分配数据可以具有特定的种类,如果请求的待分配数据具有多个种类,则可以分别判断每个种类下的待分配数据的数量是否满足,全部满足则转向步骤S4。In the above technical solution, the data to be allocated may have a specific type. If the requested data to be allocated has multiple types, it can be judged whether the quantity of data to be allocated under each type is satisfied, and if all are satisfied, turn to step S4.
在一个较佳的实施例中,待分配数据具有多个类别;In a preferred embodiment, the data to be allocated has multiple categories;
相同类别的待分配数据存储在同一数据队列中。Data to be allocated of the same category are stored in the same data queue.
在一个较佳的实施例中,路由地址为路由器设备的IP地址。In a preferred embodiment, the routing address is the IP address of the router device.
在一个较佳的实施例中,具体通过对包含待分配数据的数据文件进行解析后,将解析得到的待分配数据预存在多个数据队列中。In a preferred embodiment, after parsing the data file containing the data to be allocated, the data to be allocated obtained by the analysis is pre-stored in a plurality of data queues.
上述技术方案中,待分配数据的数据文件可以具有特定的格式,能够快速进行批量操作。In the above technical solution, the data file of the data to be allocated may have a specific format, and batch operations can be performed quickly.
上述实施例中,优选地,解析得到的数据文件记录在一数据库中;In the above-mentioned embodiment, preferably, the data file obtained by parsing is recorded in a database;
步骤S5中,还根据待分配数据的取出情况对数据库进行更新,从而保证待分配数据的取出情况在数据库中是最新的,便于查询和管理。In step S5, the database is also updated according to the fetching situation of the data to be allocated, so as to ensure that the fetching situation of the data to be allocated is the latest in the database, which is convenient for query and management.
在一个较佳的实施例中,关于每个数据队列的存储情况的队列资源记录表中具体可以包括:In a preferred embodiment, the queue resource record table about the storage situation of each data queue may specifically include:
数据队列的数量信息,和/或位置信息,和/或优先级信息,和/或存储信息类型信息,和/或存储限制信息。The number information of the data queue, and/or the location information, and/or the priority information, and/or the storage information type information, and/or the storage restriction information.
在一个较佳的实施例中,待分配数据按照一预设存储规则预存在多个数据队列中;In a preferred embodiment, the data to be allocated is pre-stored in a plurality of data queues according to a preset storage rule;
预设存储规则为:随机存储,或顺序存储,或按优先级顺序存储等。The preset storage rules are: random storage, sequential storage, or storage in priority order, etc.
综上所述,本发明提出的一种数据分配方法,包括:步骤S1,获取用户的数据请求;步骤S2,根据数据请求,按照一预设的路由地址选择规则从队列资源记录表中选中相应的数据队列;步骤S3,判断选中的数据队列是否完全满足数据请求;若是,则转向步骤S4;若否,则转向步骤S6;步骤S4,将数据队列中的待分配数据取出;步骤S5,根据待分配数据的取出情况对路由地址选择规则中的参数进行更新;步骤S6,结束;能够对分布式的待分配数据进行高效和精确的管理,可靠性高。To sum up, a data distribution method proposed by the present invention includes: step S1, obtaining a data request from a user; step S2, selecting a corresponding data request from a queue resource record table according to a preset routing address selection rule according to the data request step S3, judge whether the selected data queue fully meets the data request; if so, turn to step S4; if not, turn to step S6; step S4, take out the data to be allocated in the data queue; step S5, according to When the data to be distributed is taken out, the parameters in the routing address selection rule are updated; step S6 , the process ends; the distributed data to be distributed can be managed efficiently and accurately, and the reliability is high.
通过说明和附图,给出了具体实施方式的特定结构的典型实施例,基于本发明精神,还可作其他的转换。尽管上述发明提出了现有的较佳实施例,然而,这些内容并不作为局限。Typical examples of specific structures of specific embodiments are given through the description and drawings, and other transformations may be made based on the spirit of the present invention. Although the above-described invention provides existing preferred embodiments, these are not intended to be limiting.
对于本领域的技术人员而言,阅读上述说明后,各种变化和修正无疑将显而易见。因此,所附的权利要求书应看作是涵盖本发明的真实意图和范围的全部变化和修正。在权利要求书范围内任何和所有等价的范围与内容,都应认为仍属本发明的意图和范围内。Various changes and modifications will no doubt become apparent to those skilled in the art upon reading the above description. Therefore, the appended claims should be construed to cover all changes and modifications of the true intent and scope of this invention. Any and all equivalent ranges and content within the scope of the claims should still be considered to be within the intent and scope of the invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810718706.XACN109101344B (en) | 2018-06-29 | 2018-06-29 | Data distribution method |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810718706.XACN109101344B (en) | 2018-06-29 | 2018-06-29 | Data distribution method |
| Publication Number | Publication Date |
|---|---|
| CN109101344A CN109101344A (en) | 2018-12-28 |
| CN109101344Btrue CN109101344B (en) | 2022-04-12 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810718706.XAActiveCN109101344B (en) | 2018-06-29 | 2018-06-29 | Data distribution method |
| Country | Link |
|---|---|
| CN (1) | CN109101344B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI276322B (en)* | 2005-12-28 | 2007-03-11 | Ind Tech Res Inst | A system and a method of request scheduling using request classification and allowable server resource for the differentiated quality of service |
| CN103516585B (en)* | 2012-06-29 | 2017-04-26 | 北京奇虎科技有限公司 | Method and system for distributing messages according to priorities |
| US9390055B2 (en)* | 2012-07-17 | 2016-07-12 | Coho Data, Inc. | Systems, methods and devices for integrating end-host and network resources in distributed memory |
| CN103019649B (en)* | 2012-11-29 | 2016-08-31 | 北京奇虎科技有限公司 | Information providing method and equipment |
| CN103473334B (en)* | 2013-09-18 | 2017-01-11 | 中控技术(西安)有限公司 | Data storage method, inquiry method and system |
| CN103713895B (en)* | 2013-11-29 | 2017-12-05 | 北京奇虎科技有限公司 | A kind of data transmission method for uplink and device |
| CN104125167A (en)* | 2014-07-24 | 2014-10-29 | 海信集团有限公司 | Flow control method and device |
| CN104954468A (en)* | 2015-06-18 | 2015-09-30 | 小米科技有限责任公司 | Resource allocation method and resource allocation device |
| US10044638B2 (en)* | 2016-05-26 | 2018-08-07 | 1Qb Information Technologies Inc. | Methods and systems for quantum computing |
| US20170351555A1 (en)* | 2016-06-03 | 2017-12-07 | Knuedge, Inc. | Network on chip with task queues |
| CN106936926B (en)* | 2017-04-18 | 2020-05-15 | 广州华多网络科技有限公司 | Method and system for accessing data node |
| Publication number | Publication date |
|---|---|
| CN109101344A (en) | 2018-12-28 |
| Publication | Publication Date | Title |
|---|---|---|
| US9673998B2 (en) | Differential cache for representational state transfer (REST) API | |
| US20080175222A1 (en) | Url patterns for multi tenant systems | |
| JP6534402B2 (en) | Method for handling data quality exceptions, computer programs and exception engines | |
| US20240348677A1 (en) | Network Address Resolution | |
| US20120072465A1 (en) | Dynamic schema-based api mapping for traversing inter-cloud application boundaries | |
| CN107656981A (en) | A kind of data sharing and management method and system based on identification technology | |
| US20090119376A1 (en) | Hint-Based Email Address Construction | |
| US12056089B2 (en) | Method and system for deleting obsolete files from a file system | |
| US11755608B2 (en) | Interactive dataflow preview | |
| US20230239376A1 (en) | Request processing in a content delivery framework | |
| JP2017220112A (en) | Data management system, control method and program | |
| CN103561083B (en) | Internet of things data processing method | |
| CN108459842B (en) | Model configuration method and device and electronic equipment | |
| US11784968B1 (en) | Distributed domain name systems and methods | |
| CN107967305A (en) | Image file upload method, server and readable storage medium storing program for executing | |
| CN109101344B (en) | Data distribution method | |
| CN108737556A (en) | A kind of method, apparatus and equipment of processing REST requests | |
| JP2018500671A5 (en) | ||
| JP5567676B2 (en) | System and method for providing an electronic business card by retrieving storage means according to one or more criteria | |
| CN112783843A (en) | Data reading method and device and electronic equipment | |
| JP6522261B1 (en) | Method and apparatus for managing file attribute information {METHOD FOR MANAGING ATTRIBUTE INFORMATION OF FILE AND COMPUTING DEVICE USING THE SAME} | |
| CN113626188A (en) | Task pushing method and device, computer equipment and storage medium | |
| JP6226737B2 (en) | Data distribution management system | |
| CN108011804A (en) | Service pairing system and method for instant messaging software | |
| JP3709464B2 (en) | Network identification method and apparatus |
| 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 |