Data transmission method, system, device and storage medium

By determining the slice location when generating data to be notified and directly allocating it to distributed nodes, the server access pressure problem after data sharding in the insurance system is solved, achieving efficient data transmission and system scalability.

CN114968987BActive Publication Date: 2026-03-27CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-22
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In existing insurance systems, when benefits are distributed, data sharding causes a surge in server access, impacting database performance and even disrupting normal system operation.

Method used

While generating the data to be notified, the slice position is determined based on the dynamic slice factor and the preset total number of slices, and the data is directly allocated to the corresponding distributed nodes to avoid distributed nodes scanning the same data blocks.

Benefits of technology

It reduced server access pressure, improved data transmission efficiency, and enhanced system scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968987B_ABST
    Figure CN114968987B_ABST
Patent Text Reader

Abstract

The application provides a data sending method, system, device and storage medium. The method comprises the following steps: receiving to-be-notified data, wherein the to-be-notified data comprises a slice position, and the slice position is obtained according to a dynamic slice factor and a preset total number of slices; and distributing the to-be-notified data to a corresponding distributed node according to the slice position, so that the distributed node sends the to-be-notified data. The application contains the slice position corresponding to the to-be-notified data in the generated to-be-notified data. After the to-be-notified data is generated, the to-be-notified data can be directly distributed to the corresponding distributed node, without being stored in an EXCEL table after the to-be-notified data is generated. In this way, the situation that each distributed node scans the same data block is avoided, the access pressure of the server is reduced, and the data sending efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and in particular to a data sending method, system, device and storage medium. BACKGROUND

[0002] Welfare distribution is a function frequently used in daily life. Common welfare distribution scenarios include online lucky draw, coupon distribution in live streaming room, and welfare distribution by insurance companies. Taking welfare distribution by insurance companies as an example, welfare distribution data is generally stored in an EXCEL table. The data in the EXCEL table needs to be imported into an insurance system, and then distributed by multiple nodes. In order to improve the efficiency of data processing, the data needs to be sharded first.

[0003] The existing method is to shard data by distributed concurrent batch update. Before concurrent processing, the data in the EXCEL table needs to be sharded. Each distributed node scans the EXCEL table to obtain a corresponding shard, and then each distributed node processes the shard it is responsible for. Although this scheme of sharding after data generation can improve processing speed, in order to allocate data to distributed nodes, each distributed node needs to scan the EXCEL table. As a result, different distributed nodes will scan the same data block, causing the access volume of the server storing the EXCEL table to soar, and further causing the database performance to decline, and even affecting the normal operation of all functions of the insurance system, causing serious performance problems. SUMMARY

[0004] The present application provides a data sending method, system, device and storage medium, which mainly aims to reduce the access pressure of the server when the insurance system sends notification data, and effectively improve the efficiency of sending notification data.

[0005] In a first aspect, an embodiment of the present application provides a data sending method, comprising:

[0006] receiving to-be-notified data, wherein the to-be-notified data comprises a slice position, and the slice position is obtained according to a dynamic slice factor and a preset total number of slices;

[0007] allocating the to-be-notified data to a corresponding distributed node according to the slice position, so that the distributed node sends the to-be-notified data.

[0008] Preferably, the to-be-notified data is multiple, and the slice position is obtained according to a dynamic slice factor and a preset total number of slices, by the following steps:

[0009] For the current to-be-notified data, obtaining a position interval difference between the current to-be-notified data and the first to-be-notified data;

[0010] a current dynamic slice factor corresponding to the current to-be-notified data, the real-time position of the current dynamic slice factor in a preset factor value table is obtained according to the interval difference and the preset total number of slices;

[0011] a real-time value of the current dynamic slice factor is found from the preset factor value table according to the real-time position;

[0012] a slice position corresponding to the current to-be-notified data is obtained according to the real-time value and the preset total number of slices;

[0013] the next to-be-notified data is taken as the current to-be-notified data again, and the above steps are repeated until the current to-be-notified data is the last to-be-notified data.

[0014] Preferably, the real-time position of the current dynamic slice factor in a preset factor value table is obtained according to the interval difference and the preset total number of slices, comprising:

[0015] the interval difference and the preset total number of slices are taken as a modulus, and a modulus result is taken as the real-time position.

[0016] Preferably, the real-time value of the current dynamic slice factor is found from the preset factor value table according to the real-time position, and is calculated by the following formula:

[0017] Q=P[N+1],

[0018] wherein Q represents the real-time value of the current dynamic slice factor, P represents the preset factor value table, N represents the real-time position, and P[N+1] represents the N+1th data in the preset factor value table.

[0019] Preferably, the slice position corresponding to the current to-be-notified data is obtained according to the real-time value and the preset total number of slices, comprising:

[0020] the real-time value and the preset total number of slices are taken as a modulus, and a modulus result is taken as the slice position.

[0021] Preferably, the slice position is stored in a digital type.

[0022] Preferably, the system further comprises a directory index, and the target index is used to store key information of the to-be-notified data.

[0023] In a second aspect, an embodiment of the present application provides a data sending system, comprising:

[0024] The receiving module is configured to receive to-be-notified data, wherein the to-be-notified data comprises a slice position, and the slice position is obtained according to a dynamic slice factor and the preset total number of slices.

[0025] The sending module is configured to distribute the to-be-notified data to a corresponding distributed node according to the slice position, so that the distributed node sends the to-be-notified data.

[0026] In a third aspect, an embodiment of the present application provides a computer device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the data sending method when executing the computer program.

[0027] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program, and the computer program implements the steps of the data sending method when executed by a processor.

[0028] The data sending method, system, device and storage medium provided by the present application contain the slice position corresponding to the to-be-notified data in the generated to-be-notified data, and the to-be-notified data is directly distributed to the corresponding distributed node after the to-be-notified data is generated, without being stored in an EXCEL table after the to-be-notified data is generated, so that the situation that each distributed node scans the same data block is avoided, the access pressure of the server is reduced, and the data sending efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS

[0029] Figure 1 A scene schematic diagram of a data sending method provided by an embodiment of the present application is shown in the figure.

[0030] Figure 2 A flowchart of a data sending method provided by an embodiment of the present application is shown in the figure.

[0031] Figure 3 A flowchart of a slice position obtaining method in an embodiment of the present application is shown in the figure.

[0032] Figure 4 A structure schematic diagram of a data sending system provided by an embodiment of the present application is shown in the figure.

[0033] Figure 5 A structure schematic diagram of a computer device provided by an embodiment of the present application is shown in the figure.

[0034] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0035] It should be understood that the specific embodiments described herein are merely intended to explain the present application, and are not intended to limit the present application.

[0036] Figure 1 A scene diagram of a data sending method provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, a user inputs to-be-notified data and a preset total number of slices on a page provided by a client, and sends the to-be-notified data and the preset total number of slices to a server. After receiving the to-be-notified data and the preset total number of slices, the server executes the data sending method to send all the to-be-notified data. Figure 1

[0037] It should be noted that the server can be implemented by an independent server or a server cluster composed of multiple servers. The client can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto. The client and the server can be connected through Bluetooth, a universal serial bus (USB) or other communication connection manners, and the embodiments of the present application do not limit the connection manners.

[0038] In actual business, the existing scheme is to perform slice processing on to-be-notified data written in a table after the to-be-notified data is generated. For data in the table which has not been subjected to slice processing, the slice values of the data need to be updated. Thus, all distributed nodes need to scan the data which has not been subjected to slice processing, which will cause access pressure on a database and low efficiency. To solve the problem, an embodiment of the present application allocates a slice position of to-be-notified data when the to-be-notified data is generated, and does not need to store the to-be-notified data in a table. After the to-be-notified data is generated, the to-be-notified data is directly allocated to a corresponding distributed node, which avoids the access pressure on the database. To facilitate understanding of the embodiment, first, a data sending method disclosed by the embodiment of the present application is described in detail, Figure 2 A flowchart of a data sending method provided by an embodiment of the present application is shown in FIG. 2. As shown in FIG. 2, the method comprises the following steps. Figure 2

[0039] S210, receiving to-be-notified data, wherein the to-be-notified data comprises a slice position, and the slice position is obtained according to a dynamic slice factor and a preset total number of slices.

[0040] ​​First, the data to be notified, that is, the data to be sent, such as the data to be notified is the insurance benefit data, the data to be notified includes the specific content of the benefit, the effective time of use, the insurance store for use, etc. The specific content of the benefit can be a discount coupon, a full-reduction coupon, a gift coupon, etc. The effective time of use is that these coupons can be used within which time. The insurance store for use refers to the stores where these coupons can be used. In addition, the data to be notified also includes a slice position, which refers to the position of the distributed node to which the data to be notified should be allocated. The specific content contained in the data to be notified in different specific scenarios in the embodiment of the application is different. The data type of the data to be notified in the embodiment of the application is an object, and the attributes contained include the specific content of the benefit, the effective time of use, the insurance store for use, etc. The data to be notified can be obtained from a target source station or pasted from other servers. Specifically, the target source station is a station that provides data for each insurance system. The conditions for issuing benefits are input in the target source station, and then the data to be notified corresponding to the conditions is generated. When the data to be notified is generated, in addition to generating the specific content, the slice position contained in the data to be notified is also generated. In addition, the data to be notified can also be copied from the target source station. The original data to be notified does not have the parameter of the slice position, so before copying, a parameter needs to be added to each data to be notified, which indicates the slice position.

[0041] In order to store the data to be notified on multiple distributed nodes, data sharding is a technology for determining the distribution of data on multiple storage devices. In the embodiment of the application, the slice position is determined according to the dynamic slice factor and the preset total number of slices, that is, the position of the distributed node to which the data to be notified is allocated is determined by the dynamic slice factor and the preset total number of slices. The value of the dynamic slice factor in the embodiment of the application can be fixed or not fixed, but changes according to a certain rule. The preset total number of slices represents the total number of slices, that is, the total number of distributed nodes. The slice position is determined according to the dynamic slice factor and the preset total number of slices, including the following four methods:

[0042] 1. Number segment division method. In this method, the dynamic slicing factor is fixed, which is generally applicable to the case of integer type notification data. The same size of number segment interval is stored on each device. The dynamic slicing factor represents the number of notification data on each distributed node. The product of the dynamic slicing factor and the preset total number of slices is the total number of notification data. A distributed node can be regarded as a device. For example, the notification data with the number segment [1, 10000] is placed on the first device, the notification data with the number segment [10001, 20000] is placed on the second device, and so on. This method is simple to implement and convenient to expand. The number of devices can be doubled to expand the capacity. For example, if there are N devices originally, N new devices are added to expand the capacity. Half of the notification data on each old device is migrated to a new device. The device with the number segment [1, 10000] retains only the notification data with the number segment [1, 5000] after expansion. The notification data with the number segment [5001, 10000] is migrated to a newly added device. The disadvantage of this method is that the data may not be evenly distributed. For example, the amount of small number segment data may be greater than that of large number segment data. The heat of each number segment may also be different, resulting in uneven load of each device. In addition, expansion is not flexible and can only double the number of devices.

[0043] 2. Modulus method. In this method, the dynamic slicing factor is dynamic and not fixed. The number of devices, i.e., the preset total number of slices, is taken as a modulus. Assuming there are N devices numbered 0 to N-1, the device number (i.e., the slice value) of the notification data can be determined by the dynamic slicing factor % N. This method is also simple to implement, and the data distribution and load are relatively uniform. Any number of devices can be added to expand the capacity. The disadvantage of this method is that a large amount of data migration occurs during expansion. For example, when expanding from N devices to N+1 devices, most of the data needs to be migrated between devices.

[0044] 3. Retrieval table query method. The mapping relationship between the notification data and the device is stored in the retrieval table. The data distribution can be determined by searching the retrieval table. The retrieval table can be flexible. The mapping relationship can be stored for each notification data, or the number segment division method can be combined to reduce the capacity of the retrieval table. In this way, the data can be evenly distributed, the load can be balanced, and the amount of data migration during expansion and contraction can be small. The disadvantage of this method is that the space required to store the retrieval table can be large. In order to ensure that the amount of data migration caused by expansion and contraction is small, the algorithm for determining the mapping relationship is also complex.

[0045] The above methods are commonly used data slicing methods, and each method has different advantages and disadvantages and is suitable for different scenarios. The specific method can be determined according to the actual situation, and the embodiments of the present application do not make specific limitations.

[0046] The to-be-notified data provided by the embodiment of the present application generates the slice position at the same time of generating the to-be-notified data, and does not need to calculate the slice position after the to-be-notified data is generated, thereby avoiding the condition that multiple distributed nodes scan a data block at the same time in the traditional method, and reducing the access pressure of the server.

[0047] In S220, the to-be-notified data is distributed to the corresponding distributed node according to the slice position, so that the distributed node sends the to-be-notified data.

[0048] Then, the to-be-notified data is distributed to the distributed node corresponding to the slice position. For example, all the distributed nodes are numbered, when the slice position is calculated as 1, the to-be-notified data is distributed to the first distributed node, when the slice position is 2, the to-be-notified data is distributed to the second distributed node, and so on. Alternatively, the slice position represents the address of the distributed node. In the specific implementation process, the addresses of all the distributed nodes are stored in a preset address list in a preset order, and the slice position represents the position of the distributed node to which the to-be-notified data is distributed in the preset address list. The slice position is used to find the address first, and then the corresponding distributed node is found according to the address. The distributed node can be regarded as a device, and each distributed node receives the corresponding to-be-notified data and then distributes all the to-be-notified data on the system.

[0049] The data sending method provided by the present application contains the slice position corresponding to the to-be-notified data in the generated to-be-notified data, and the to-be-notified data can be directly distributed to the corresponding distributed node after the to-be-notified data is generated, without storing the to-be-notified data in the EXCEL table after the to-be-notified data is generated, thereby avoiding the condition that each distributed node scans the same data block, reducing the access pressure of the server, and improving the data sending efficiency.

[0050] In addition, the number of distributed nodes is increased or reduced in the embodiment of the present application, and when the number of distributed nodes changes, the preset total number of slices also changes, without the need to recompile the program, thereby greatly improving the scalability of the business system.

[0051] On the basis of the above embodiment, preferably, the to-be-notified data is multiple, the slice position is obtained according to a dynamic slice factor and the preset total number of slices, and the slice position is obtained by the following steps:

[0052] For the current to-be-notified data, the position interval difference between the current to-be-notified data and the first to-be-notified data is obtained.

[0053] According to the position interval difference and the preset total number of slices, a real-time position of the current dynamic slice factor in a preset factor value table is obtained;

[0054] According to the real-time position, a real-time value of the current dynamic slice factor is found from the preset factor value table;

[0055] According to the real-time value and the preset total number of slices, a slice position corresponding to the current to-be-notified data is obtained;

[0056] The next to-be-notified data is taken as the current to-be-notified data again, and the above steps are repeated until the current to-be-notified data is the last to-be-notified data.

[0057] Figure 3 A flowchart of a slice position obtaining method in an embodiment of the present application is shown in FIG. 1. Figure 3 There are multiple to-be-notified data in the embodiment of the present application, and each to-be-notified data contains a respective slice position. The slice positions in different to-be-notified data can be the same or different. Taking any one to-be-notified data as the current to-be-notified data as an example, first, a position interval difference between the current to-be-notified data and the first to-be-notified data is calculated. For example, the position of the first to-be-notified data is 1, and the position of the second to-be-notified data is 2 in time sequence, and so on, to obtain the position of the current to-be-notified data. Then, the position interval difference is obtained by subtracting the position of the first to-be-notified data from the position of the current to-be-notified data.

[0058] In the embodiment of the present application, the dynamic slice factor corresponding to the current to-be-notified data is referred to as the current dynamic slice factor. Then, according to the position interval difference and the preset total number of slices, the real-time position of the current dynamic slice factor in the preset factor value table is calculated. Specifically, the preset factor value table can be stored in an array type, a table type or a vector type when stored. The preset factor value table includes all possible values of the dynamic slice factor. In the embodiment of the present application, the position of the current dynamic slice factor in the preset factor value table is calculated first. The method for obtaining the position can be to take the modulus of the position interval difference and the preset total number of slices, and the obtained modulus is taken as the position of the current dynamic slice factor in the preset factor value table. Alternatively, the quotient of the position interval difference and the preset total number of slices is obtained, and the obtained quotient is taken as the real-time position of the current dynamic slice factor in the preset factor value table. In the embodiment of the present application, the modulus of the position interval difference and the preset total number of slices is taken as the position of the current dynamic slice factor in the preset factor value table.

[0059] Then according to the real-time position, the real-time value of the current dynamic slice factor is found from the preset factor value table, in the embodiment of the application, the preset factor table is stored in the form of an array, and the specific value expression is: Q=P[N+1], wherein Q represents the real-time value of the current dynamic slice factor, P represents the preset factor value table, N represents the real-time position, and P[N+1] represents the N+1th data in the preset factor value table.

[0060] Finally, according to the real-time value and the preset total number of slices, the slice position corresponding to the current to-be-notified data is obtained, which can be that the real-time value and the preset total number of slices are taken modulo, and the obtained modulus is taken as the slice position corresponding to the current to-be-notified data, or that the current to-be-notified data and the preset total number of slices are divided, and the obtained quotient is taken as the slice position corresponding to the current to-be-notified data.

[0061] In the embodiment of the application, the real-time value and the preset total number of slices are taken modulo, and the obtained modulus is taken as the slice position corresponding to the current to-be-notified data, for example, the maximum value of the dynamic slice factor can be set to more than 10 times the preset total number of slices, so as to avoid exceeding the dynamic slice factor scenario when the actual slice number is increased, and the slice position is obtained by taking the dynamic slice factor and the preset total number of slices modulo (dynamic slice factor % actual slice number=slice position), for example, the dynamic slice factor is set to cycle between 0, 1, 2, …, 119, and the preset total number of slices is set to 12, and then the slice position calculation logic algorithm is as follows:

[0062] Taking any one of the first to-be-notified data to the 120th to-be-notified data as an example, the calculation method of the address is explained as follows:

[0063] For the first to-be-notified data in the cycle, the slice position is 0%12=0; for the second to-be-notified data in the cycle, the slice position is 1%12=1; for the third to-be-notified data in the cycle, the slice position is 2%12=2; for the fourth to-be-notified data in the cycle, the slice position is 3%12=3; for the fifth to-be-notified data in the cycle, the slice position is 4%12=4; for the sixth to-be-notified data in the cycle, the slice position is 5%12=5; for the seventh to-be-notified data in the cycle, the slice position is 6%12=6; for the eighth to-be-notified data in the cycle, the slice position is 7%12=7; for the ninth to-be-notified data in the cycle, the slice position is 8%12=8; for the tenth to-be-notified data in the cycle, the slice position is 9%12=9; for the eleventh to-be-notified data in the cycle, the slice position is 10%12=10; for the twelfth to-be-notified data in the cycle, the slice position is 11%12=11; for the thirteenth to-be-notified data in the cycle, the slice position is 12%12=0; for the fourteenth to-be-notified data in the cycle, the slice position is 13%12=1; and so on until the current cycle ends and the next cycle begins until all cycles are completed.

[0064] In the embodiment of the present application, the data slicing is performed by the modulo method, so that the amount of data allocated to each distributed node is approximately the same, thereby making the distribution of data amount more uniform. Through the above slicing processing, the slicing operation is completed when the to-be-notified data is generated, thereby simplifying the design process, and the falling table and slicing operations are completed synchronously, the slicing operation is pre-processed to the data generation stage, thereby simplifying the two-step operation to one-step operation, which reduces the update operation of the table caused by the subsequent slicing step, and the simplification of the process reduces the interaction with the database, thereby releasing a lot of database resources, thereby achieving the purpose of reducing the pressure on the database.

[0065] Preferably, in the above embodiment, the slice position is stored in a numerical type.

[0066] In the embodiment of the present application, the slice position is stored in a numerical type format, while the traditional method is stored in a string format, and the storage space occupied by a string is larger than that occupied by a number, so that storing in a numerical type can save storage space, and the query speed of a number is higher than that of a string, so that storing in a numerical type can improve the positioning speed of the query.

[0067] Preferably, in the above embodiment, the slice position is stored in a numerical type.

[0068] The target index in which the key information of the to-be-notified data is stored is also established in the embodiment of the application. When the to-be-notified data needs to be queried, the target index can be used for querying, which can greatly reduce the huge pressure on the database caused by the distributed nodes processing data, and the distributed nodes do not need to scan their own shard data, and the problem of database disk hotspot is not caused.

[0069] Figure 4 A structural schematic diagram of a data sending system provided by the embodiment of the application is shown in FIG. 4. Figure 4 As shown in FIG. 4, the system includes a receiving module 410 and a sending module 420, wherein:

[0070] The receiving module 410 is configured to receive to-be-notified data, wherein the to-be-notified data includes a slice position, and the slice position is obtained according to a dynamic slice factor and a preset total number of slices.

[0071] The sending module 420 is configured to distribute the to-be-notified data to a corresponding distributed node according to the slice position, so that the distributed node sends the to-be-notified data.

[0072] The embodiment of the system corresponding to the above method has the same implementation process as the above method, and details are referred to the above embodiment. The system embodiment will not be described here.

[0073] On the basis of the above embodiment, preferably, the to-be-notified data is multiple, and the receiving module includes an interval unit, a position unit, a searching unit, a slicing unit and a loop unit, wherein:

[0074] The interval unit is configured to obtain a position interval difference between the current to-be-notified data and the first to-be-notified data for the current to-be-notified data.

[0075] The position unit is configured to obtain a real-time position of a current dynamic slice factor in a preset factor value table according to the position interval difference and the preset total number of slices for the current to-be-notified data corresponding to the current dynamic slice factor.

[0076] The searching unit is configured to search for a real-time value of the current dynamic slice factor from the preset factor value table according to the real-time position.

[0077] The slicing unit is configured to obtain a slice position corresponding to the current to-be-notified data according to the real-time value and the preset total number of slices.

[0078] The loop unit is configured to repeat the above steps by taking the next to-be-notified data as the current to-be-notified data until the current to-be-notified data is the last to-be-notified data.

[0079] On the basis of the above-mentioned embodiments, preferably, the position unit specifically comprises a first modulo sub-unit, wherein:

[0080] The first modulo sub-unit is configured to take modulo of the position interval difference and the preset total number of slices, and take the modulo result as the real-time position.

[0081] On the basis of the above-mentioned embodiments, preferably, the lookup unit is configured to calculate according to the following formula:

[0082] Q = P[N + 1],

[0083] wherein Q represents the real-time value of the current dynamic slice factor, P represents the preset factor value table, N represents the real-time position, and P[N + 1] represents the (N + 1)th data in the preset factor value table.

[0084] On the basis of the above-mentioned embodiments, preferably, the slice unit comprises a second modulo sub-unit, wherein:

[0085] The second modulo sub-unit is configured to take modulo of the real-time value and the preset total number of slices, and take the modulo result as the slice position.

[0086] On the basis of the above-mentioned embodiments, preferably, the slice position is stored in a digital type.

[0087] On the basis of the above-mentioned embodiments, preferably, the data sending system further comprises a directory index, wherein the target index is configured to store key information of the data to be notified.

[0088] The above-mentioned modules in the data sending system can be realized by software, hardware and combinations thereof in whole or in part. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the above-mentioned modules.

[0089] Figure 5 A structural schematic diagram of a computer device provided by the embodiments of the present application is shown in FIG. 1, which can be a server, and the internal structure diagram thereof can be as shown in FIG. 2. Figure 5As shown in the figure. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes computer storage media, internal memory. The computer storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the computer storage medium to run. The database of the computer device is used to store data generated or obtained in the process of executing the data sending method, such as to-be-notified data and a preset total number of slices. The network interface of the computer device is used to communicate with external terminals through network connection. The computer program is executed by the processor to implement a data sending method.

[0090] In one embodiment, a computer device is provided, including a memory, a processor and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the steps of the data sending method in the above-mentioned embodiments. Alternatively, the processor executes the computer program to implement the functions of the modules / units in the data sending system embodiment.

[0091] In one embodiment, a computer storage medium is provided, and the computer storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the data sending method in the above-mentioned embodiments. Alternatively, the computer program is executed by the processor to implement the functions of the modules / units in the above-mentioned data sending system embodiment.

[0092] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, storage, database or other medium used in the embodiments provided by the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0093] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of functional units and modules is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the above-described functions.

[0094] The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, but not to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A data transmission method, characterized by, The method comprises the following steps: receiving to-be-notified data, wherein the to-be-notified data comprises a slice position, and the slice position is obtained according to a dynamic slice factor and a preset total number of slices; allocating the to-be-notified data to a corresponding distributed node according to the slice position, so that the distributed node transmits the to-be-notified data, and the preset total number of slices is increased or decreased in a positive corresponding manner according to an increase or decrease in the number of the distributed nodes; wherein the to-be-notified data is multiple, the slice position is obtained according to the dynamic slice factor and the preset total number of slices, and the slice position is obtained by the following steps: for the current to-be-notified data, obtaining a position interval difference between the current to-be-notified data and the first to-be-notified data; obtaining a real-time position of the current dynamic slice factor in a preset factor value table according to the position interval difference and the preset total number of slices; finding the real-time value of the current dynamic slice factor from the preset factor value table according to the real-time position; obtaining the slice position corresponding to the current to-be-notified data according to the real-time value and the preset total number of slices; taking the next to-be-notified data as the current to-be-notified data again, and repeating the above steps until the current to-be-notified data is the last to-be-notified data, and a maximum value of the dynamic slice factor is greater than or equal to 10 times of the preset total number of slices; wherein the real-time position of the current dynamic slice factor in the preset factor value table is obtained according to the position interval difference and the preset total number of slices, comprising: taking the position interval difference and the preset total number of slices as a modulus, and taking the obtained modulus result as the real-time position; wherein the real-time value of the current dynamic slice factor is found from the preset factor value table according to the real-time position, and is calculated by the following formula: Q=P[N+1], wherein Q represents the real-time value of the current dynamic slice factor, P represents the preset factor value table, N represents the real-time position, and P[N+1] represents the N+1th data in the preset factor value table; wherein the slice position corresponding to the current to-be-notified data is obtained according to the real-time value and the preset total number of slices, comprising: taking the real-time value and the preset total number of slices as a modulus, and taking the obtained modulus result as the slice position.

2. The data transmitting method according to any one of claim 1, characterized by, The slice position is stored in a digital type.

3. The data transmitting method according to any one of claims 1, wherein Further comprising a directory index, wherein the target index is used to store key information of the to-be-notified data.

4. A data transmission system characterized by The method comprises the following steps: a receiving module, configured to receive to-be-notified data, wherein the to-be-notified data comprises a slice position, and the slice position is obtained according to a dynamic slice factor and a preset total number of slices; a sending module, configured to allocate the to-be-notified data to a corresponding distributed node according to the slice position, so that the distributed node transmits the to-be-notified data, and the preset total number of slices is increased or decreased in a positive corresponding manner according to an increase or decrease in the number of the distributed nodes; The to-be-notified data are multiple, and the receiving module comprises an interval unit, a position unit, a searching unit, a slicing unit and a loop unit, wherein: the interval unit is configured to obtain a position interval difference between the current to-be-notified data and the first to-be-notified data for the current to-be-notified data; the position unit is configured to obtain a real-time position of a current dynamic slicing factor in a preset factor value table according to the position interval difference and the preset total number of slices for the current to-be-notified data; the searching unit is configured to search for a real-time value of the current dynamic slicing factor from the preset factor value table according to the real-time position; the slicing unit is configured to obtain a slicing position corresponding to the current to-be-notified data according to the real-time value and the preset total number of slices; and the loop unit is configured to repeat the above steps by taking the next to-be-notified data as the current to-be-notified data until the current to-be-notified data is the last to-be-notified data, and a maximum value of the dynamic slicing factor is greater than or equal to 10 times of the preset total number of slices. The position unit specifically comprises a first modulo sub-unit, wherein: the first modulo sub-unit is configured to take modulo of the position interval difference and the preset total number of slices, and take the modulo result as the real-time position. The searching unit is calculated by the following formula: Q=P[N+1], wherein Q represents the real-time value of the current dynamic slicing factor, P represents the preset factor value table, N represents the real-time position, and P[N+1] represents the N+1th data in the preset factor value table. The slicing unit comprises a second modulo sub-unit, which is configured to take modulo of the real-time value and the preset total number of slices, and take the modulo result as the slicing position.

5. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the data sending method according to any one of claims 1 to 3.

6. A computer storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1-5. The computer program is executed by the processor to implement the steps of the data sending method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Data loading method, device and system

    CN110955720A

  • Hidden trace query method and system supporting keyword query

    CN113254982A