WO2021036321A1 - Supervision data reporting, electronic apparatus, device and computer-readable storage medium - Google Patents

Supervision data reporting, electronic apparatus, device and computer-readable storage medium Download PDF

Info

Publication number
WO2021036321A1
WO2021036321A1 PCT/CN2020/087938 CN2020087938W WO2021036321A1 WO 2021036321 A1 WO2021036321 A1 WO 2021036321A1 CN 2020087938 W CN2020087938 W CN 2020087938W WO 2021036321 A1 WO2021036321 A1 WO 2021036321A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
sub
sent
data packet
sending
Prior art date
Application number
PCT/CN2020/087938
Other languages
French (fr)
Chinese (zh)
Inventor
赵成龙
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2021036321A1 publication Critical patent/WO2021036321A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9057Arrangements for supporting packet reassembly or resequencing

Definitions

  • This application relates to the technical field of uploading regulatory data of big data, and in particular to a method, electronic device, equipment, and computer-readable storage medium for reporting regulatory data.
  • the amount of data obtained by financial institutions is increasing, especially a large amount of high-frequency unstructured data. Due to the need to maintain the order of the financial market, financial institutions need to send the regulatory data generated by their corresponding transactions to the regulatory authorities for filing.
  • the inventor realizes that due to the large number of financial institutions, there will be multiple financial institutions reporting regulatory data to the regulatory authority at the same time.
  • the existing regulatory data is reported to the regulatory agency. If the amount of data is large, the corresponding reporting of the regulatory data will be reported. The text will be very large, and if the network is unstable, there will be interruption in the transmission of regulatory data. Due to the relatively high time limit of the supervisory department for the uploading of supervisory data, once the uploading of supervisory data generates a terminal, it is difficult to meet the supervisory timeliness requirements.
  • this application proposes a method, electronic device, equipment, and computer-readable storage medium for reporting regulatory data, aiming to solve the problem that the uploading of regulatory data in the prior art cannot meet the timeliness.
  • the embodiments of this application restrict each The size of the data packet is convenient for network transmission. After sub-packaging, multiple threads are used to report data, which greatly saves time compared with the previous single thread and meets the timeliness requirements of supervision.
  • this application proposes a method for reporting regulatory data.
  • the method includes the steps:
  • the sub-data packet, the decoded tag, and the flag code are sent.
  • the present application also provides an electronic device, the device includes: a supervisory data reporting terminal module;
  • the monitoring data reporting terminal module includes:
  • the setting module is used to store transaction data based on the transaction behavior with each transaction party, and set a flag code for each transaction data;
  • a judging module configured to determine multiple transaction data as data to be sent, and to judge whether the size of the data to be sent is greater than a first preset value
  • the sub-packet module is used to perform sub-packet processing on the data packet to be sent when the judgment result of the judging module is yes to obtain multiple sub-data packets, wherein the size of any one sub-data packet is smaller than the first Two preset values;
  • a decoding module configured to assign a decoding label to each of the multiple sub-data packets
  • the sending module is configured to send the sub-data packet based on the determined number of threads.
  • the present application also provides a device including a memory, a processor, and a computer program stored in the memory and capable of running on the processor.
  • the processor implements any item when the computer program is executed. The steps of the monitoring data reporting method.
  • the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the supervisory data reporting methods are implemented.
  • the supervision data reporting method, device, equipment and computer-readable storage medium proposed in this application meet the timeliness requirements of supervision, and by assigning decoding tags to sub-data packets, the supervision data can be received after receiving supervision data. Time to quickly find the corresponding sub-data packet and decode it. After decoding, each transaction data can be confirmed through the mark code to avoid data loss.
  • Fig. 1 is a schematic flowchart of a method for reporting supervision data according to the first embodiment of the present application
  • FIG. 2 is a schematic flowchart of a method for reporting supervision data according to a second embodiment of the present application
  • Fig. 3 is a schematic flowchart of a method for reporting supervision data according to a third embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a method for reporting supervision data according to a fourth embodiment of the present application.
  • FIG. 5 is an optional application environment diagram of the electronic device according to the embodiment of the present application.
  • FIG. 6 is a schematic diagram of the hardware architecture of the electronic device according to the first embodiment of the present application.
  • FIG. 7 is a schematic diagram of program modules of the electronic device according to the first embodiment of the present application.
  • the executive body of the supervision data reporting method may be the supervision data reporting terminal module, or other terminals or devices containing the supervision data reporting method processor, and the supervision data reporting terminal module. other devices.
  • an embodiment of the present application provides a method for reporting supervision data, which includes the following steps:
  • S101 Store transaction data based on transaction behavior with each transaction party, and set a flag code for each transaction data.
  • each transaction will generate data information with the payment institution, so this transaction will generate information about each participant for the payment institution, so There will be one transaction data in the sequential transactions generated for one transaction party.
  • each transaction there is generally a transaction number, such as an order number, which is a unique symbol. It can be used as a symbol code, or a new number is set as a symbol code for each transaction. Each symbol code is not repeated. , To facilitate the identification of each transaction.
  • a transaction number such as an order number, which is a unique symbol. It can be used as a symbol code, or a new number is set as a symbol code for each transaction. Each symbol code is not repeated. , To facilitate the identification of each transaction.
  • the logo code can also be the payment transaction number of this transaction, for example, a payment transaction number formed by a third party or a transaction platform during payment.
  • the logo code can also be generated by other methods, as long as it is a unique designated logo generated for each transaction, and the embodiment of the present application does not specifically limit it here.
  • S102 Determine multiple transaction data as data to be sent, and determine whether the size of the data to be sent is greater than a first preset value; if so, go to step 103.
  • the generated transaction data is used as the data to be sent within a period of time.
  • a short time range is set, and all transaction information in this range is used as the data to be sent.
  • the trading platform will communicate with financial institutions to share relevant data of the transaction.
  • the shared data includes but is not limited to: product specific information, transaction links, transaction amount details, order time, Recipient information. Therefore, the supervisory data reporting terminal corresponding to the embodiment of the present application will obtain the transaction and store it after each transaction. Take the existing credit card as an example. After the user spends on the platform, the bank will obtain the transaction data of the consumption and record it in the bill.
  • the data generated by the financial institution will be sent to the regulatory agency regularly, and the specific sending time can be set to be periodic or sent according to the size of the generated data. Therefore, in the embodiment of the present application, the data to be sent can be determined according to the preset data sending cycle or the generated data size, and the data generated by the target folder.
  • the target area is set, then the data generated for the financial institution will be stored in the target area, and then the newly generated data in the target area is determined as the data to be sent.
  • the data generated in a fixed time unit is determined as the data to be sent, for example, the data generated in 1s is determined as the data to be sent by using 1s as the unit.
  • the embodiment of the present application presets a comparison object for the size of the data to be sent, that is, the first preset value, and compares the data to be sent with the first preset value.
  • step S302 When the data to be sent is greater than the first preset value, When there is a preset value, step S302 is executed; otherwise, the data packet is directly sent.
  • the first preset value is 500M
  • the data to be sent is 600M
  • step S302 needs to be performed. If the data to be sent is 450M, then the data packet to be sent is sent directly.
  • S103 Perform packet processing on the data packet to be sent to obtain multiple sub-data packets, wherein the size of any one of the sub-data packets is smaller than a second preset value.
  • the first preset value is a threshold that reflects the network transmission capability. It is understandable that when the data to be sent is less than the first preset value, subcontracting processing can be performed, or it can be sent directly without subcontracting processing. The purpose is to not perform subcontracting processing when the data to be sent is not larger than the comparison object. It can realize effective transmission while saving the time of sub-packing processing, and achieve the balance of data sub-packing processing and direct transmission.
  • the size of each sub-data packet is limited to facilitate rapid network transmission, and it is also a sub-data packet threshold set during network transmission capacity and data transmission efficiency.
  • the second preset value and the first preset value in the embodiment of the present application may be equal or unequal.
  • the first preset value is equal to the second preset value, both are 500M, and the data to be sent is 600M, then the data packet to be sent needs to be subpackaged, and how many sub-data packets are divided into specific sub-packets, this embodiment of the application
  • the divided sub-data packets are limited by the second preset value, and each divided sub-data packet cannot be greater than the second preset value, that is, not greater than 500M.
  • a 600M data packet to be sent can be divided into 2 data packets for transmission, for example, divided into 2 data packets, one is 400M, one is 200M; or one is 300M, one is 300M; or one is 250M, One is 350M; or one is 150M and one is 450M.
  • divided into 3 data packets one is 200M, one is 200M, one is 200M; or one is 300M, one is 200M, one is 100M; or one is 250M, one is 150M, one is 200M; or one is 250M, one is 250M, one is 100M, or it can be divided into 3 data packets, 4 data packets, 10 data packets, etc.
  • the embodiment of the present application does not specifically limit it here.
  • the first preset value is not equal to the second preset value.
  • the second preset value can be 400M, 450M, or 300M, etc. Etc., the embodiments of the present application do not make specific numerical limitations here.
  • S104 Allocate a decoding label to each data packet of the multiple sub-data packets.
  • each sub-data packet constitutes a complete whole of the data to be sent. Therefore, in order to make the data to be sent at the receiving end to form a whole for storage, a decoding label is assigned to each sub-data packet. It is understandable that encoding and compression is required before data is sent. For example, by compressing a package, each sub-data package can be a sub-compression package, and all the sub-compression packages are put together and decompressed to form a complete data package. Therefore, it is easy to find the corresponding sub-data packet after the corresponding decoding label is allocated, and the decoding efficiency is improved.
  • a thread is also called a lightweight process (LWP for short), which is the smallest unit of program execution flow.
  • LWP lightweight process
  • a thread is an entity in a process, and a basic unit independently scheduled and dispatched by the system.
  • the sending thread may be determined according to the size of the data to be sent. It is understandable that if the data to be sent is relatively large, more threads are needed to send sub-data packets. Therefore, in the embodiment of the present application, the number of sending threads can be determined by the size of the data packet to be sent.
  • the idle line can be a line that is not currently working, or a line whose load is lower than the threshold.
  • the load threshold of the line can obtain the transmission data volume of each timing unit in multiple timing units, and obtain the total data transmission volume in the multiple timing units. If it is lower than a total data transmission volume value, it is regarded as Idle thread.
  • S106 Send the sub-data packet, decode the label, and the flag code based on the determined thread.
  • a thread has a relatively independent and schedulable execution unit, and the sub-data packet is sent directly through the execution unit to realize the data sending process.
  • the decoding label corresponding to each sub-data packet of China Unicom and the mark code corresponding to each transaction data can enable the receiving end to quickly decode by decoding the label and sub-data packet to obtain the corresponding data packet, and then target the data in the packet.
  • Each transaction data of the company is checked by the mark code to confirm whether there is data error or loss, and to improve the accuracy of data transmission.
  • the usual data transmission environment is: there are multiple threads and multiple sub-data packets, which can be sent sequentially according to the generation time of the sub-data packets. For example, there are three threads: thread A, thread B, and thread C. , And the transmission capacity is the same, there are 10 sub-data packets, which are transmitted through thread A, thread B, and thread C3 in sequence according to the generation time of the sub-data packet.
  • the transmission capabilities of the threads are different, they can be allocated.
  • a thread with a strong transmission capability transmits larger sub-data packets, otherwise a smaller sub-data packet is transmitted; or a thread with strong transmission capability transmits more sub-data packets, Otherwise, fewer sub-data packets are transmitted.
  • the supervisory data reporting method proposed in this application sets a flag code for each transaction data after acquiring transaction behaviors with each transaction party and storing transaction data, and then determines multiple transaction data as pending
  • the packet to be sent needs to be subpackaged to obtain multiple sub-data packets after sub-packaging, and the size of each sub-data packet is less than
  • the second preset value is assigned to each data packet with a decoding label; then the sub-data packet, the decoding label and the flag code are sent through the determined sending thread.
  • the size of the sub-data packet is smaller than the second preset value, so that the small data packet can still be transmitted normally even when the transmission rate is poor, which avoids the direct transmission in the prior art.
  • the transmission of supervision data causes transmission failure under the condition of poor network transmission, and solves the problem that the supervision data upload cannot meet the timeliness in the prior art. Therefore, compared with the previous single thread, it greatly saves time and fully satisfies the supervision. Timeliness requirements, and by assigning decoding tags to sub-data packets, the corresponding sub-data packets can be quickly found and decoded when the supervision data is received. After decoding, each transaction data can be confirmed through the tag code to avoid data Lost.
  • the step of sub-packaging the data packet to be sent to obtain multiple sub-data packets includes:
  • S201 Calculate a multiple of the size of the data packet to be sent and the first preset value.
  • the ratio of the data packet to be sent to the first preset value is 1.2.
  • S202 Determine the number of data packets corresponding to the calculated multiple according to the relationship between the preset multiple value and the data packet value.
  • each data packet value has a corresponding relationship with the multiple value
  • the corresponding relationship can be set to multiple choices, and each choice corresponds to a network In different network situations, you can choose different correspondences.
  • the number of data packets is set to be no less than the certificate corresponding to the multiple value. For example, if the multiple value is 1.2, the corresponding data packet is set to be no less than: the smallest integer corresponding to the multiple value
  • the Ethernet bandwidth can be set according to the bandwidth of the data transmission LAN.
  • the Ethernet bandwidth can be divided into: 10Mbps Ethernet, 100Mbps Ethernet, 1Gbps Ethernet, 10Gbps Ethernet, 100Gbps Ethernet.
  • the wider the transmission capacity, the stronger the bandwidth is greater than 100Mbps Ethernet, the number of data packets and the integer corresponding to the multiple value (the integer is the smallest integer not less than the multiple value) can be the same, for example, calculated If the multiple of is 2.1, the number of data packets is 3.
  • S203 Divide the data packets to be sent according to the determined number of data packets.
  • the data packet to be sent is divided according to the determined data packet.
  • the data packet to be sent is 600M
  • the first preset value is 500M
  • the ratio of the data packet to be sent to the first preset value is 1.2.
  • each sub-data packet may be evenly distributed or unevenly distributed, which is not specifically limited in the embodiment at the time of this application.
  • S204 Determine whether the size of the divided sub-data packet is not less than a second preset value; if so, perform S205.
  • the size of each sub-data packet can be the same or different. If it is not equal, it must be ensured that the size of each sub-data packet cannot exceed the second preset value, otherwise the division continues in step S205. step.
  • the step of determining the number of sending threads based on the currently idle threads includes:
  • the determination of the number of idle threads in the embodiment of the present application may be the same as the above-mentioned process of determining the current idle thread, and details are not described in the embodiment of the present application.
  • step S302 Determine whether the number of idle threads is not greater than the multiple value; if so, perform step S303.
  • the embodiment of the present application provides a solution that saves thread resources by corresponding to one sub-data packet by one thread in order to save data threads when the current data transmission is tight.
  • the number of currently idle threads is not greater than the multiple value, all idle threads are used for data transmission; otherwise, when the number of idle threads is greater than the multiple value, it is determined that the number is closest to the multiple An integer of; the determined integer number of threads are determined as sending threads.
  • a specific implementation method of sending the sub-data packet, decoding the label, and the flag code based on the determined thread including the steps:
  • S401 Prioritize the sub-data packets.
  • the priority setting can be artificially set, or a certain rule can be set so that the supervisory data reporting end automatically generates the priority of the sub-data packet.
  • the method of automatically generating the priority may be to set the priority to be high when the self-data packet contains shopping data of the VIP user.
  • priority transmission can be performed when the data packet is transmitted again, so it can be artificially set as a sub-data packet with a high transmission priority.
  • S402 According to the priority, store the sub-data packet and the corresponding decoding tag and flag code in a data sending queue.
  • the data transmission queue of this application is a first-in, first-out FIFO memory, which is used for buffering the data to be sent.
  • the idle thread can take the corresponding data from the data sending queue one by one, and then send it.
  • the status of the thread changes from idle to busy.
  • the sending ends the status of the thread changes from busy to idle, and the queue is again queued. Take the data in the data sending queue to realize the data sending one by one.
  • FIG. 5 and FIG. 6 it is a schematic diagram of an optional application environment of the electronic device 50 of the present application.
  • the electronic device 50 can communicate with the supervisory data reporting end module 10 and the data receiving end 40 in a wired or wireless manner.
  • the data of the supervisory data reporting end module 10 is sent to the data receiving end 40 through the network interface 53, and the data information can also be sent to the data receiving end 40 through the network interface 53.
  • the display interface so as to realize the data transmission after the supervision data is reported.
  • FIG. 5 is a schematic diagram of an optional hardware architecture of the electronic device 50 of the present application.
  • the electronic device 50 includes, but is not limited to, a memory 51, a processor 52, and a network interface 53 that can communicate with each other through a system bus.
  • FIG. 5 only shows the electronic device 50 with components 51-53, but it should be understood that It is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
  • the memory 51 includes at least one type of readable storage medium.
  • the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), and static memory.
  • the memory 51 may be an internal storage unit of the electronic device 50, such as a hard disk or a memory of the electronic device 50.
  • the memory may also be an external storage device of the electronic device 50, such as a plug-in hard disk equipped on the electronic device 50, a smart media card (SMC), a secure digital ( Secure Digital, SD card, Flash Card, etc.
  • the memory 51 may also include both an internal storage unit of the electronic device 50 and an external storage device thereof.
  • the memory 51 is generally used to store the operating system and various application software installed in the electronic device 50, such as the program code of the supervisory data reporting terminal module 10, etc.
  • the memory 51 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 52 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments.
  • the processor 52 is generally used to control the overall operation of the electronic device 50.
  • the processor 52 is used to run the program code or process data stored in the memory 51, for example, to run the supervisory data reporting terminal module 10 and so on.
  • the network interface 53 may include a wireless network interface or a wired network interface, and the network interface 53 is generally used to establish a communication connection between the electronic device 50 and other electronic devices.
  • this application proposes an electronic device 50.
  • FIG. 5 it is a schematic diagram of program modules of the electronic device 50 according to the first embodiment of the present application.
  • the electronic device 50 includes a series of computer program instructions stored on the memory 51.
  • the supervisory data reporting operations of the various embodiments of the present application can be implemented.
  • the electronic device 50 may be divided into one or more modules based on specific operations implemented by various parts of the computer program instructions.
  • the supervisory data reporting end module 10 in the electronic device can be divided into: a setting module 501, a judgment module 502, a subcontracting module 503, an allocation module 504, a determination module 505, and a sending module 506. among them:
  • the setting module 501 is used for storing transaction data based on the transaction behavior with each transaction party, and setting a flag code for each transaction data;
  • the judging module 502 is configured to determine the data to be sent, and judge whether the size of the data to be sent is greater than a first preset value
  • the sub-packet module 503 is configured to perform sub-packet processing on the data packet to be sent when the judgment result of the judgment module is yes to obtain multiple sub-data packets, wherein the size of any one of the sub-data packets is less than Second preset value
  • An allocating module 504 configured to allocate a decoding label to each data packet of the multiple sub-data packets
  • the determining module 505 is used to determine the sending thread
  • the sending module 506 is configured to send the sub-data packet based on the determined number of threads.
  • subcontracting module 503 includes:
  • the calculation sub-module 601 is configured to calculate a multiple of the size of the data packet to be sent and the first preset value
  • the first determining submodule 602 is configured to determine the number of data packets corresponding to the calculated multiple according to the relationship between the preset multiple value and the data packet value;
  • the first dividing submodule 603 is configured to divide the data packet to be sent according to the determined number of data packets
  • the judging sub-module 604 is used to judge whether the size of the divided sub-data packet is not less than the second preset value
  • the second division sub-module 605 is configured to divide the sub-data packet again when the judgment result of the judgment sub-module is yes.
  • the determining module 505 is specifically configured to determine the sending thread according to the size of the data to be sent.
  • the determining module 505 includes:
  • the second determining submodule 701 is used to determine the current idle thread
  • the third determining submodule 702 is configured to determine the number of sending threads based on the current idle thread.
  • the third determining submodule 702 includes:
  • the first determining unit 801 is used to determine the current number of idle threads
  • the judging unit 802 is configured to judge whether the number of idle threads is not greater than the multiple value
  • the second determining unit 803 is configured to determine the current idle thread as the sending thread when the judgment result of the judgment unit is yes.
  • the determining module 505 further includes:
  • the fourth determining submodule 901 is configured to determine the integer closest to the multiple when the number of idle threads is greater than the multiple value;
  • the fifth determining submodule 902 is configured to determine the determined integer number of threads as sending threads.
  • sending module 506 further includes:
  • a sorting sub-module which is used to prioritize the sub-data packets
  • the first sending sub-module is configured to store the sub-data packet and the corresponding decoding tag and flag code in the data sending queue according to the priority;
  • the second sending submodule is used to sequentially take out and send the data in the data sending queue through the determined thread.
  • the electronic device provided by the embodiment of the present application greatly saves time in the previous single thread, and fully meets the timeliness requirements of supervision. Moreover, by assigning decoding tags to sub-data packets, it can be used when supervised data is received. Quickly find the corresponding sub-data packet and decode it. After decoding, each transaction data can be confirmed through the mark code to avoid data loss.
  • This application also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a cabinet server (including independent servers, or more) that can execute programs.
  • a server cluster composed of two servers) and so on.
  • the computer device in this embodiment at least includes, but is not limited to, a memory, a processor, etc. that can be communicatively connected to each other through a system bus.
  • the computer-readable storage medium may be non-volatile or volatile, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory). Etc.), random access memory (RAM), static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, Disks, CDs, servers, App application malls, etc., have computer programs stored thereon, and the programs implement corresponding functions when executed by the processor.
  • the computer-readable storage medium of this embodiment is used to store the electronic device 20, and when executed by a processor, realizes the supervision data reporting method of the present application.

Abstract

The present application relates to the field of big data. Disclosed are a supervision data reporting method, an electronic apparatus, a device and a computer-readable storage medium. The method specifically comprises: storing transaction data on the basis of transaction behaviors with each transaction party, and setting an identification code for each piece of the transaction data; determining a plurality of pieces of transaction data as data to be sent, and determining whether the size of the data to be sent is greater than a first preset value; if yes, dividing a data packet to be sent to obtain a plurality of sub data packets, the size of any sub data packet being less than a second preset value; allocating a decoding tag for each data packet in the plurality of sub data packets; determining sending threads; and sending the sub data packets, the decoding tag, and the identification code on the basis of the determined threads. By applying the embodiments of the present application, the size of each data packet is limited to facilitate network transmission, and after packet division, data is reported by using multiple threads, thereby greatly saving time as compared with the previous data reporting using a single thread, and meeting the timeliness requirement of supervision.

Description

监管数据上报、电子装置、设备及计算机可读存储介质Supervision data reporting, electronic devices, equipment, and computer-readable storage media
本申请要求于2019年8月30日提交中国专利局、申请号为201910814524.7,发明名称为“监管数据上报方法、电子装置、设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on August 30, 2019, the application number is 201910814524.7, and the invention title is "Supervisory Data Reporting Methods, Electronic Devices, Equipment, and Computer-readable Storage Media", all of which The content is incorporated in this application by reference.
技术领域Technical field
本申请涉及大数据的监管数据的上传技术领域,尤其涉及一种监管数据上报方法、电子装置、设备及计算机可读存储介质。This application relates to the technical field of uploading regulatory data of big data, and in particular to a method, electronic device, equipment, and computer-readable storage medium for reporting regulatory data.
背景技术Background technique
金融机构获取的数据量不断增长,尤其是大量高频非结构化的数据,由于需要维护金融市场的秩序,金融机构需要将其对应的交易等产生的监管数据发送到监管部门进行备案。The amount of data obtained by financial institutions is increasing, especially a large amount of high-frequency unstructured data. Due to the need to maintain the order of the financial market, financial institutions need to send the regulatory data generated by their corresponding transactions to the regulatory authorities for filing.
发明人意识到,由于金融机构较多,会存在同时有多家金融机构将监管数据上报到监管部门,现有的监管数据上报监管机构,若数据量较大的话,监管数据所对应的上报报文会很大,如果在网络不稳定的情况下会出现监管数据传输中断。由于监管部门对监管数据上传的时限性较高,一旦监管数据的上传产生终端,就难以满足监管时效性要求。The inventor realizes that due to the large number of financial institutions, there will be multiple financial institutions reporting regulatory data to the regulatory authority at the same time. The existing regulatory data is reported to the regulatory agency. If the amount of data is large, the corresponding reporting of the regulatory data will be reported. The text will be very large, and if the network is unstable, there will be interruption in the transmission of regulatory data. Due to the relatively high time limit of the supervisory department for the uploading of supervisory data, once the uploading of supervisory data generates a terminal, it is difficult to meet the supervisory timeliness requirements.
因此,现提供一种有效的监管数据上报方法是亟待解决的技术问题。Therefore, it is an urgent technical problem to provide an effective monitoring data reporting method.
发明内容Summary of the invention
有鉴于此,本申请提出一种监管数据上报方法、电子装置、设备及计算机可读存储介质,旨在解决现有技术中监管数据上传不能满足时效性的问题,本申请实施例通过限制每个数据包的大小,便于网络传输,分包后,再使用多线程上报数据,比之前单一线程大幅节约了时间,满足了监管的时效性要求。In view of this, this application proposes a method, electronic device, equipment, and computer-readable storage medium for reporting regulatory data, aiming to solve the problem that the uploading of regulatory data in the prior art cannot meet the timeliness. The embodiments of this application restrict each The size of the data packet is convenient for network transmission. After sub-packaging, multiple threads are used to report data, which greatly saves time compared with the previous single thread and meets the timeliness requirements of supervision.
首先,为实现上述目的,本申请提出一种监管数据上报方法,所述方法包括步骤:First of all, in order to achieve the above-mentioned purpose, this application proposes a method for reporting regulatory data. The method includes the steps:
基于与每一交易方的交易行为存储交易数据,并为每一个交易数据设定标志码;Store transaction data based on transaction behavior with each transaction party, and set a flag code for each transaction data;
将多个交易数据确定为待发送数据,并判断所述待发送数据的大小是否大于第一预设值;Determining multiple transaction data as data to be sent, and determining whether the size of the data to be sent is greater than a first preset value;
如果是,对所述待发送数据包进行分包处理,得到多个子数据包,其中,任意一个子数据包的大小均小于第二预设值;If yes, perform sub-packet processing on the to-be-sent data packet to obtain multiple sub-data packets, wherein the size of any one of the sub-data packets is smaller than the second preset value;
为所述多个子数据包中的每一个数据包分配一个解码标签;Allocating a decoding label to each of the multiple sub-data packets;
确定发送线程;Determine the sending thread;
基于所确定的线程发送所述子数据包、解码标签以及标志码。Based on the determined thread, the sub-data packet, the decoded tag, and the flag code are sent.
此外,为实现上述目的,本申请还提供一种电子装置,所述装置包括:监管数据上报端模块;In addition, in order to achieve the above objective, the present application also provides an electronic device, the device includes: a supervisory data reporting terminal module;
其中,所述监管数据上报端模块包括:Wherein, the monitoring data reporting terminal module includes:
设定模块,用于基于与每一交易方的交易行为存储交易数据,并为每一个交易数据设定标志码;The setting module is used to store transaction data based on the transaction behavior with each transaction party, and set a flag code for each transaction data;
判断模块,用于将多个交易数据确定为待发送数据,并判断所述待发送数据的大小是否大于第一预设值;A judging module, configured to determine multiple transaction data as data to be sent, and to judge whether the size of the data to be sent is greater than a first preset value;
分包模块,用于在所述判断模块的判断结果为是的情况下,对所述待发送数据包进行分包处理,得到多个子数据包,其中,任意一个子数据包的大小均小于第二预设值;The sub-packet module is used to perform sub-packet processing on the data packet to be sent when the judgment result of the judging module is yes to obtain multiple sub-data packets, wherein the size of any one sub-data packet is smaller than the first Two preset values;
解码模块,用于为所述多个子数据包中的每一个数据包分配一个解码标签;A decoding module, configured to assign a decoding label to each of the multiple sub-data packets;
确定模块,用于确定发送线程;Determine module, used to determine the sending thread;
发送模块,用于基于所确定的线程个数发送所述子数据包。The sending module is configured to send the sub-data packet based on the determined number of threads.
此外,为实现上述目的,本申请还提供一种设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现任一项所述监管数据上报方法的步骤。In addition, in order to achieve the above object, the present application also provides a device including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. The processor implements any item when the computer program is executed. The steps of the monitoring data reporting method.
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现任一项所述监管数据上报方法的步骤。In addition, in order to achieve the foregoing objective, the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the supervisory data reporting methods are implemented.
相较于现有技术,本申请所提出的监管数据上报方法、装置、设备及计算机可读存储介质,满足了监管的时效性要求,且通过为子数据包分配解码标签能够在接收到监管数据时进行快速找到相应的子数据包并解码,在解码后还能通过标志码对每一个交易数据进行确认,避免数据丢失。Compared with the prior art, the supervision data reporting method, device, equipment and computer-readable storage medium proposed in this application meet the timeliness requirements of supervision, and by assigning decoding tags to sub-data packets, the supervision data can be received after receiving supervision data. Time to quickly find the corresponding sub-data packet and decode it. After decoding, each transaction data can be confirmed through the mark code to avoid data loss.
附图说明Description of the drawings
图1是本申请第一实施例之监管数据上报方法的流程示意图;Fig. 1 is a schematic flowchart of a method for reporting supervision data according to the first embodiment of the present application;
图2是本申请第二实施例之监管数据上报方法的流程示意图;2 is a schematic flowchart of a method for reporting supervision data according to a second embodiment of the present application;
图3是本申请第三实施例之监管数据上报方法的流程示意图;Fig. 3 is a schematic flowchart of a method for reporting supervision data according to a third embodiment of the present application;
图4是本申请第四实施例之监管数据上报方法的流程示意图;4 is a schematic flowchart of a method for reporting supervision data according to a fourth embodiment of the present application;
图5是本申请实施例之电子装置一可选的应用环境图;FIG. 5 is an optional application environment diagram of the electronic device according to the embodiment of the present application;
图6是本申请第一实施例之电子装置的硬件架构示意图;6 is a schematic diagram of the hardware architecture of the electronic device according to the first embodiment of the present application;
图7是本申请第一实施例之电子装置的程序模块示意图。FIG. 7 is a schematic diagram of program modules of the electronic device according to the first embodiment of the present application.
具体实施方式detailed description
需要说明的是,本申请实施例中,监管数据上报方法的执行主体可以为监管数据上报端模块,或者是包含监管数据上报方法处理器的其他终端或装置,以及是包含监管数据上报端模块的其他设备。It should be noted that in this embodiment of the application, the executive body of the supervision data reporting method may be the supervision data reporting terminal module, or other terminals or devices containing the supervision data reporting method processor, and the supervision data reporting terminal module. other devices.
为解决现有技术问题,如图1所示,本申请实施例提供了一种监管数据上报方法,包括步骤如下:To solve the problem of the prior art, as shown in FIG. 1, an embodiment of the present application provides a method for reporting supervision data, which includes the following steps:
S101,基于与每一交易方的交易行为存储交易数据,并为每一个交易数据设定标志码。S101: Store transaction data based on transaction behavior with each transaction party, and set a flag code for each transaction data.
需要说明的是,以一个交易平台为例,在交易平台产生交易的时候,每一笔交易都会和支付机构产生数据信息,那么这一笔交易针对于支付机构会产生各个参与方的信息,所以在针对一个交易方产生的依次交易就会有一次交易数据。It should be noted that, taking a trading platform as an example, when the trading platform generates a transaction, each transaction will generate data information with the payment institution, so this transaction will generate information about each participant for the payment institution, so There will be one transaction data in the sequential transactions generated for one transaction party.
针对每一个交易一般都会存在一个交易号,例如订单号,是唯一的标志,可以将其作为标志码,或者针对每一个交易另外设置一个新的号码作为标志码,每一个标志码都是不重复的,便于进行每一个交易的识别。For each transaction, there is generally a transaction number, such as an order number, which is a unique symbol. It can be used as a symbol code, or a new number is set as a symbol code for each transaction. Each symbol code is not repeated. , To facilitate the identification of each transaction.
此外,标志码还可以是此次交易的支付交易号,例如,在支付的时候通过第三方或者交易平台形成的支付交易号。In addition, the logo code can also be the payment transaction number of this transaction, for example, a payment transaction number formed by a third party or a transaction platform during payment.
需要说明的是,标志码还可以是由其他方式产生的,只要是针对每一个交易产生的唯一指定标志即可,本申请实施例在此不做具体限定。It should be noted that the logo code can also be generated by other methods, as long as it is a unique designated logo generated for each transaction, and the embodiment of the present application does not specifically limit it here.
S102,将多个交易数据确定为待发送数据,并判断所述待发送数据的大小是否大于第一预设值;如果是,执行步骤103。S102: Determine multiple transaction data as data to be sent, and determine whether the size of the data to be sent is greater than a first preset value; if so, go to step 103.
可以理解的是,交易数据是越来越多的,而且在同一时间可能会呈现出多个交易数据,那么针对交易数据进行处理。It is understandable that there are more and more transaction data, and multiple transaction data may be presented at the same time, then the transaction data will be processed.
本申请的一种实现方式中,针对每一类物品的交易数据,在一个时间段内,将产生的交易数据作为待发送数据。In an implementation manner of the present application, for the transaction data of each type of item, the generated transaction data is used as the data to be sent within a period of time.
本申请的另一种实现方式中,设置一较短的时间范围,在该范围内所有的交易信息作为待发送数据。In another implementation of the present application, a short time range is set, and all transaction information in this range is used as the data to be sent.
可以理解的是,当产生交易的时候交易平台会与金融机构通信,将此次交易的相关数据进行共享,共享的数据包括不限于:产品的具体信息、交易链接、交易金额明细、订单时间、收付款方信息。因此,会在每一次交易过后本申请实施例所对应的监管数据上报端获得交易并存储。以现有的信用卡为例,当用户在平台消费以后,银行会获得此次消费的交易数 据,并在账单中进行记录。It is understandable that when a transaction occurs, the trading platform will communicate with financial institutions to share relevant data of the transaction. The shared data includes but is not limited to: product specific information, transaction links, transaction amount details, order time, Recipient information. Therefore, the supervisory data reporting terminal corresponding to the embodiment of the present application will obtain the transaction and store it after each transaction. Take the existing credit card as an example. After the user spends on the platform, the bank will obtain the transaction data of the consumption and record it in the bill.
需要说明的是,金融机构产生的数据会定时的发送到监管机构,具体的发送时间可以设置为周期性的,或者是根据产生数据的大小进行发送。因此,本申请实施例中,可以根据预设的数据发送周期或者产生的数据大小、目标文件夹所产生的数据进行确定待发送数据。It should be noted that the data generated by the financial institution will be sent to the regulatory agency regularly, and the specific sending time can be set to be periodic or sent according to the size of the generated data. Therefore, in the embodiment of the present application, the data to be sent can be determined according to the preset data sending cycle or the generated data size, and the data generated by the target folder.
一种具体实现方式中,设置目标区域,那么针对金融机构产生的数据会保存在目标区域中,然后将目标区域新产生的数据确定为待发送数据。In a specific implementation manner, the target area is set, then the data generated for the financial institution will be stored in the target area, and then the newly generated data in the target area is determined as the data to be sent.
另一种具体实现方式中,以固定时间单位里产生的数据确定为待发送数据,例如,以1s为单位,将1s内产生的数据确定为待发送数据。In another specific implementation manner, the data generated in a fixed time unit is determined as the data to be sent, for example, the data generated in 1s is determined as the data to be sent by using 1s as the unit.
本领域技术人员可以理解的是,本申请实施例预先设置关于待发送数据大小的比较对象,即第一预设值,将待发送数据与第一预设值进行比较,当待发送数据大于第一预设值的时候执行步骤S302,否则,直接发送数据包。示例性的,第一预设值为500M,待发送数据为600M,那么需要执行步骤S302,若待发送数据为450M,那么直接进行待发送数据包的发送处理。Those skilled in the art can understand that the embodiment of the present application presets a comparison object for the size of the data to be sent, that is, the first preset value, and compares the data to be sent with the first preset value. When the data to be sent is greater than the first preset value, When there is a preset value, step S302 is executed; otherwise, the data packet is directly sent. Exemplarily, the first preset value is 500M, and the data to be sent is 600M, then step S302 needs to be performed. If the data to be sent is 450M, then the data packet to be sent is sent directly.
可以理解的是,通过待发送数据与第一预设值的比较,可以确定待发送数据是否过大,以避免直接发送造成数据发送失败的问题。It is understandable that by comparing the data to be sent with the first preset value, it can be determined whether the data to be sent is too large, so as to avoid the problem of data sending failure caused by direct sending.
S103,对所述待发送数据包进行分包处理,得到多个子数据包,其中,任意一个子数据包的大小均小于第二预设值。S103: Perform packet processing on the data packet to be sent to obtain multiple sub-data packets, wherein the size of any one of the sub-data packets is smaller than a second preset value.
需要说明的是,第一预设值,是体现网络传输能力的阈值。可以理解的是,当待发送数据小于第一预设值时可以进行分包处理,也可以不进行分包处理而直接发送,目的是在待发送数据不大于比较对象时不进行分包处理也能够实现有效传输的同时节省了分包处理的时间,达到数据分包处理和直接传输的平衡。It should be noted that the first preset value is a threshold that reflects the network transmission capability. It is understandable that when the data to be sent is less than the first preset value, subcontracting processing can be performed, or it can be sent directly without subcontracting processing. The purpose is to not perform subcontracting processing when the data to be sent is not larger than the comparison object. It can realize effective transmission while saving the time of sub-packing processing, and achieve the balance of data sub-packing processing and direct transmission.
针对第二预设值,是限定每个子数据包的大小,以便于进行网络快速传输,也是根据网络的传输能力和数据的传输效率进行时设定的子数据包阈值。Regarding the second preset value, the size of each sub-data packet is limited to facilitate rapid network transmission, and it is also a sub-data packet threshold set during network transmission capacity and data transmission efficiency.
因此,针对不同的数据传输网络和不同的传输效率要求(例如,需要及时得到数据时则需要分割成较小的数据包,以实现较快发送减少传输时间的目的)而设定。本申请实施例中的第二预设值和第一预设值可以是相等的,也可以是不相等的。Therefore, it is set for different data transmission networks and different transmission efficiency requirements (for example, when data needs to be obtained in time, it needs to be divided into smaller data packets to achieve faster transmission and reduce transmission time). The second preset value and the first preset value in the embodiment of the present application may be equal or unequal.
示例性的,第一预设值与第二预设值相等,均为500M,待发送数据为600M,那么需要进行待发送数据包的分包,具体分为多少个子数据包,本申请实施例通过第二预设值进行限定划分后的子数据包,每一个划分后的子数据包不能大于第二预设值,即不大于500M。Exemplarily, the first preset value is equal to the second preset value, both are 500M, and the data to be sent is 600M, then the data packet to be sent needs to be subpackaged, and how many sub-data packets are divided into specific sub-packets, this embodiment of the application The divided sub-data packets are limited by the second preset value, and each divided sub-data packet cannot be greater than the second preset value, that is, not greater than 500M.
那么,600M的待发送数据包,可以分为2个数据包进行发送,例如,划分为2个数据包,一个为400M、一个为200M;或者一个为300M、一个为300M;或者一个为250M、一 个为350M;或者一个为150M、一个为450M。例如,划分为3个数据包,一个为200M、一个为200M、一个为200M;或者一个为300M、一个为200M、一个为100M;或者一个为250M、一个为150M、一个为200M;或者一个为250M、一个为250M、一个为100M,也可以划分为3个数据包,4个数据包,10个数据包等等,本申请实施例在此不做具体限定。Then, a 600M data packet to be sent can be divided into 2 data packets for transmission, for example, divided into 2 data packets, one is 400M, one is 200M; or one is 300M, one is 300M; or one is 250M, One is 350M; or one is 150M and one is 450M. For example, divided into 3 data packets, one is 200M, one is 200M, one is 200M; or one is 300M, one is 200M, one is 100M; or one is 250M, one is 150M, one is 200M; or one is 250M, one is 250M, one is 100M, or it can be divided into 3 data packets, 4 data packets, 10 data packets, etc. The embodiment of the present application does not specifically limit it here.
本申请的另一种实施例中,第一预设值与第二预设值不相等,假设第一预设值为500M,第二预设值可以为400M,450M,也可以为300M,等等,本申请实施例在此不做具体数值限定。In another embodiment of the present application, the first preset value is not equal to the second preset value. Assuming that the first preset value is 500M, the second preset value can be 400M, 450M, or 300M, etc. Etc., the embodiments of the present application do not make specific numerical limitations here.
S104,为所述多个子数据包中的每一个数据包分配一个解码标签。S104: Allocate a decoding label to each data packet of the multiple sub-data packets.
需要说明的是,所有的子数据包是构成一个待发送数据的完整整体,所以为了使得待发送数据在接收端便于形成一个整体进行存储,针对每一个子数据包分配一个解码标签。可以理解的是,数据发送之前是需要进进行编码压缩的,例如通过压缩包,每一个子数据包可以是一个子压缩包,全部的子压缩包放在一起解压后形成一个完整的数据包。因此,在分配了对应的解码标签以后便于找到对应的子数据包,提高解码效率。It should be noted that all sub-data packets constitute a complete whole of the data to be sent. Therefore, in order to make the data to be sent at the receiving end to form a whole for storage, a decoding label is assigned to each sub-data packet. It is understandable that encoding and compression is required before data is sent. For example, by compressing a package, each sub-data package can be a sub-compression package, and all the sub-compression packages are put together and decompressed to form a complete data package. Therefore, it is easy to find the corresponding sub-data packet after the corresponding decoding label is allocated, and the decoding efficiency is improved.
S105,确定发送线程。S105: Determine the sending thread.
可以理解的是,线程又称为轻量进程(Lightweight Process,简称LWP),是程序执行流的最小单元。线程是进程中的一个实体,是被系统独立调度和分派的基本单位。It is understandable that a thread is also called a lightweight process (LWP for short), which is the smallest unit of program execution flow. A thread is an entity in a process, and a basic unit independently scheduled and dispatched by the system.
本申请的一种实施例中,确定发送线程的可以根据所述待发送数据的大小,确定发送线程。可以理解的是,如果待发送数据数据比较大的话,就需要更多的线程进行子数据包的发送,因此,本申请实施例可以通过待发送数据包的大小确定发送线程的数量。In an embodiment of the present application, the sending thread may be determined according to the size of the data to be sent. It is understandable that if the data to be sent is relatively large, more threads are needed to send sub-data packets. Therefore, in the embodiment of the present application, the number of sending threads can be determined by the size of the data packet to be sent.
本申请另一种实现方式中,还可以通过:确定当前空闲线程;基于所述当前空闲线程,确定发送线程数量。空闲线路可以是当前没有处于工作状态的线路,也可以是负载低于阈值的线路。具体的,线路的负载阈值可以获得多个计时单位中每一个计时单位的传输数据量,获得该多个计时单位中总的数据传输量,若低于一个总的数据传输量值,则视为空闲线程。In another implementation manner of the present application, it is also possible to determine the current idle thread; and determine the number of sending threads based on the current idle thread. The idle line can be a line that is not currently working, or a line whose load is lower than the threshold. Specifically, the load threshold of the line can obtain the transmission data volume of each timing unit in multiple timing units, and obtain the total data transmission volume in the multiple timing units. If it is lower than a total data transmission volume value, it is regarded as Idle thread.
S106,基于所确定的线程发送所述子数据包、解码标签以及标志码。S106: Send the sub-data packet, decode the label, and the flag code based on the determined thread.
可以理解的是,线程是有一个相对独立的、可调度的执行单元,通过执行单元直接进行子数据包的发送,实现数据的发送过程。It is understandable that a thread has a relatively independent and schedulable execution unit, and the sub-data packet is sent directly through the execution unit to realize the data sending process.
需要说明的是,联通每一个子数据包对应的解码标签和每一个交易数据对应的标志码,能够使得接收端通过解码标签和子数据包进行快速解码,获得对应的数据包,然后针对数据包里面的每一个交易数据通过标志码进行检验,确认是否发生数据错误或者丢失,提高数据传输的准确性。It should be noted that the decoding label corresponding to each sub-data packet of China Unicom and the mark code corresponding to each transaction data can enable the receiving end to quickly decode by decoding the label and sub-data packet to obtain the corresponding data packet, and then target the data in the packet. Each transaction data of the company is checked by the mark code to confirm whether there is data error or loss, and to improve the accuracy of data transmission.
可以理解的是,通常的数据传输环境为:线程为多个,子数据包也为多个,可以根据 子数据包的生成时间进行顺序发送,例如,线程为线程A、线程B、线程C3个,且传输能力相同,子数据包为10个,按照子数据包的生成时间依次通过线程A、线程B、线程C3进行传输。It is understandable that the usual data transmission environment is: there are multiple threads and multiple sub-data packets, which can be sent sequentially according to the generation time of the sub-data packets. For example, there are three threads: thread A, thread B, and thread C. , And the transmission capacity is the same, there are 10 sub-data packets, which are transmitted through thread A, thread B, and thread C3 in sequence according to the generation time of the sub-data packet.
如果线程的传输能力不同,则将可以进行分配,传输能力强的线程传输较大的子数据包,否则传输较小的子数据包;又或者传输能力强的线程传输较多的子数据包,否则传输较少的子数据包。If the transmission capabilities of the threads are different, they can be allocated. A thread with a strong transmission capability transmits larger sub-data packets, otherwise a smaller sub-data packet is transmitted; or a thread with strong transmission capability transmits more sub-data packets, Otherwise, fewer sub-data packets are transmitted.
相较于现有技术,本申请所提出的监管数据上报方法,在获取与每一交易方的交易行为存储交易数据后为每一个交易数据设定标志码,然后将多个交易数据确定为待发送数据,并判断待发送数据的大小大于第一预设值的情况下,需要对待发送数据包进行分包处理,得到分包后的多个子数据包,且每一个子数据包的大小均小于第二预设值,并为每一个数据包分配一个解码标签;然后通过所确定的发送线程发送所述子数据包、解码标签以及标志码。通过对待发送数据包进行分包处理,使得子数据包的大小均小于第二预设值,能够在传输速率较差的情况下小数据包依然能够正常传输,避免了现有技术中,直接通过对监管数据的发送在网络传输条件不好的情况下导致传输失败的问题,解决现有技术中监管数据上传不能满足时效性的问题,因此,比之前单一线程大幅节约了时间,完全满足了监管的时效性要求,且通过为子数据包分配解码标签能够在接收到监管数据时进行快速找到相应的子数据包并解码,在解码后还能通过标志码对每一个交易数据进行确认,避免数据丢失。Compared with the prior art, the supervisory data reporting method proposed in this application sets a flag code for each transaction data after acquiring transaction behaviors with each transaction party and storing transaction data, and then determines multiple transaction data as pending When sending data and judging that the size of the data to be sent is greater than the first preset value, the packet to be sent needs to be subpackaged to obtain multiple sub-data packets after sub-packaging, and the size of each sub-data packet is less than The second preset value is assigned to each data packet with a decoding label; then the sub-data packet, the decoding label and the flag code are sent through the determined sending thread. By sub-packetizing the data packet to be sent, the size of the sub-data packet is smaller than the second preset value, so that the small data packet can still be transmitted normally even when the transmission rate is poor, which avoids the direct transmission in the prior art. The transmission of supervision data causes transmission failure under the condition of poor network transmission, and solves the problem that the supervision data upload cannot meet the timeliness in the prior art. Therefore, compared with the previous single thread, it greatly saves time and fully satisfies the supervision. Timeliness requirements, and by assigning decoding tags to sub-data packets, the corresponding sub-data packets can be quickly found and decoded when the supervision data is received. After decoding, each transaction data can be confirmed through the tag code to avoid data Lost.
如图2所示,所述对所述待发送数据包进行分包处理,得到多个子数据包的步骤,包括:As shown in FIG. 2, the step of sub-packaging the data packet to be sent to obtain multiple sub-data packets includes:
S201,计算所述待发送数据包的大小与所述第一预设值的倍数值。S201: Calculate a multiple of the size of the data packet to be sent and the first preset value.
假设,待发送数据包为600M,第一预设值为500M,那么待发送数据包与第一预设值的比值为1.2。Assuming that the data packet to be sent is 600M and the first preset value is 500M, then the ratio of the data packet to be sent to the first preset value is 1.2.
S202,根据预先设置的倍数值与数据包值的关系,确定所计算出来的倍数对应的数据包个数。S202: Determine the number of data packets corresponding to the calculated multiple according to the relationship between the preset multiple value and the data packet value.
本申请实施例预先设置的倍数值与数据包值的关系表,即每一个数据包值都与倍数值存在一个对应关系,该对应关系可以进行设置为多种选择,每一种选择对应一个网络情况,可以在不同的网络情况下选择不同的对应关系。The pre-set relationship table between the multiple value and the data packet value in the embodiment of the application, that is, each data packet value has a corresponding relationship with the multiple value, and the corresponding relationship can be set to multiple choices, and each choice corresponds to a network In different network situations, you can choose different correspondences.
本申请的一种实现方式中,设置数据包的个数为不小于倍数值所对应的证书,例如,倍数值是1.2,对应的数据包是设定是不小于:倍数值所对应最小整数的预设整数倍,例如预设整数为2,那么1.2对应的最小整数为2,那么数据包的个位数为不小于:2*2=4个。In an implementation of this application, the number of data packets is set to be no less than the certificate corresponding to the multiple value. For example, if the multiple value is 1.2, the corresponding data packet is set to be no less than: the smallest integer corresponding to the multiple value The preset integer multiple, for example, the preset integer is 2, then the smallest integer corresponding to 1.2 is 2, then the unit digit of the data packet is not less than: 2*2=4.
本申请的另一种实现方式中,根据数据传输局域网的带宽进行设定,以太网带宽可以 分为:10Mbps以太网,100Mbps以太网、1Gbps以太网、10Gbps以太网、100Gbps以太网,当带宽越宽传输能力越强,可以设定在带宽为大于100Mbps以太网时,设置数据包的个数与倍数值对应的整数(该整数为不小于倍数值的最小整数)相同即可,例如,计算出来的倍数值是2.1,则数据包的个数为3。In another implementation of this application, the Ethernet bandwidth can be set according to the bandwidth of the data transmission LAN. The Ethernet bandwidth can be divided into: 10Mbps Ethernet, 100Mbps Ethernet, 1Gbps Ethernet, 10Gbps Ethernet, 100Gbps Ethernet. The wider the transmission capacity, the stronger the bandwidth is greater than 100Mbps Ethernet, the number of data packets and the integer corresponding to the multiple value (the integer is the smallest integer not less than the multiple value) can be the same, for example, calculated If the multiple of is 2.1, the number of data packets is 3.
S203,根据所确定的数据包个数对所述待发送数据包进行划分。S203: Divide the data packets to be sent according to the determined number of data packets.
根据所确定的数据包进行待发送数据包的划分,示例性的,待发送数据包为600M,第一预设值为500M,待发送数据包与第一预设值的比值为1.2,对应的数据包是3-5个,所以数据包的个数可以是3个、4个或者是5个,所以划分后的子数据包可以是3个、4个或者是5个。The data packet to be sent is divided according to the determined data packet. For example, the data packet to be sent is 600M, the first preset value is 500M, and the ratio of the data packet to be sent to the first preset value is 1.2. There are 3-5 data packets, so the number of data packets can be 3, 4, or 5, so the divided sub-data packets can be 3, 4, or 5.
可以理解的是,每一个子数据包的大小只要不超过第二预设值即可,可以是平均分配,也可以是不平均分配,本申请时实施例不做具体限定。It can be understood that, as long as the size of each sub-data packet does not exceed the second preset value, it may be evenly distributed or unevenly distributed, which is not specifically limited in the embodiment at the time of this application.
S204,判断划分后的子数据包大小是否不小于第二预设值;如果是,执行S205。S204: Determine whether the size of the divided sub-data packet is not less than a second preset value; if so, perform S205.
具体每一个子数据包的大小可以是相同的也可以是不相同的,如果是不相等的必须要保证每一个子数据包的大小都不能超过第二预设值,否则执行步骤S205的继续划分步骤。Specifically, the size of each sub-data packet can be the same or different. If it is not equal, it must be ensured that the size of each sub-data packet cannot exceed the second preset value, otherwise the division continues in step S205. step.
S205,再次对该子数据包进行划分。S205: Divide the sub-data packet again.
如图3所示,本申请的另一种实现方式中,所述基于所述当前空闲线程,确定发送线程数量的步骤,包括:As shown in FIG. 3, in another implementation manner of the present application, the step of determining the number of sending threads based on the currently idle threads includes:
S301,确定当前空闲线程个数。S301: Determine the current number of idle threads.
本申请实施例中确定空闲线程的个数,可以同上述确定当前空闲线程的过程相同,本申请实施例在此不做赘述。The determination of the number of idle threads in the embodiment of the present application may be the same as the above-mentioned process of determining the current idle thread, and details are not described in the embodiment of the present application.
S302,判断所述空闲线程个数是否不大于所述倍数值;如果是,执行步骤S303。S302: Determine whether the number of idle threads is not greater than the multiple value; if so, perform step S303.
本申请实施例提供了一种在当前数据传输紧张,为了节省数据线程,通过一个线程对应一个子数据包是最为节省线程资源的方案。The embodiment of the present application provides a solution that saves thread resources by corresponding to one sub-data packet by one thread in order to save data threads when the current data transmission is tight.
S303,将所述当前空闲线程确定为发送线程。S303: Determine the currently idle thread as the sending thread.
本申请实施例中,若当前空闲的线程个数不大于倍数值,将空闲线程全部用于进行数据发送,否则,在所述空闲线程个数大于所述倍数值,确定与所述倍数最接近的整数;将所确定的整数个线程确定为发送线程。In the embodiment of this application, if the number of currently idle threads is not greater than the multiple value, all idle threads are used for data transmission; otherwise, when the number of idle threads is greater than the multiple value, it is determined that the number is closest to the multiple An integer of; the determined integer number of threads are determined as sending threads.
本申请的一种实施例中,如图4所示,提供一种具体的基于所确定的线程发送所述子数据包、解码标签以及标志码的实现方式,包括步骤:In an embodiment of the present application, as shown in FIG. 4, a specific implementation method of sending the sub-data packet, decoding the label, and the flag code based on the determined thread is provided, including the steps:
S401,将所述子数据包进行优先级排序。S401: Prioritize the sub-data packets.
可以理解的是,优先级的设置可以是人为的进行设置,也可以是设置一定的规则使得 监管数据上报端自动生成子数据包的优先级。It is understandable that the priority setting can be artificially set, or a certain rule can be set so that the supervisory data reporting end automatically generates the priority of the sub-data packet.
一种实现方式中,自动生成优先级的方式可以是当自数据包为包含VIP用户的购物数据时,则设置为优先级高。In an implementation manner, the method of automatically generating the priority may be to set the priority to be high when the self-data packet contains shopping data of the VIP user.
另一种实现方式中,若之前传输的数据包发生丢包情况,再次进行传输时,可以进行优先传输,所以可以人为设置为高传输优先级的子数据包。In another implementation manner, if packet loss occurs in the previously transmitted data packet, priority transmission can be performed when the data packet is transmitted again, so it can be artificially set as a sub-data packet with a high transmission priority.
S402,根据所述优先级,将所述子数据包以及对应的解码标签、标志码存入数据发送队列中。S402: According to the priority, store the sub-data packet and the corresponding decoding tag and flag code in a data sending queue.
每一个子数据包与其对应的解码标签、标志码是同时传输的,所以需要同时放入到数据发送队列中。本申请的数据传输队列为先入先出的FIFO存储器,用于进行待发送数据的缓存。Each sub-data packet and its corresponding decoding label and mark code are transmitted at the same time, so they need to be put into the data sending queue at the same time. The data transmission queue of this application is a first-in, first-out FIFO memory, which is used for buffering the data to be sent.
S403,通过所确定的线程依次取出并发送所述数据发送队列中的数据。S403: Take out and send the data in the data sending queue sequentially through the determined thread.
具体的,空闲线程可以逐个从数据发送队列中取走对应的数据,然后进行发送,该线程的状态从闲变成忙,当发送结束后,该线程的状态从忙变成闲,再次进行排队取走数据发送队列中的数据,实现数据的逐个发送。Specifically, the idle thread can take the corresponding data from the data sending queue one by one, and then send it. The status of the thread changes from idle to busy. When the sending ends, the status of the thread changes from busy to idle, and the queue is again queued. Take the data in the data sending queue to realize the data sending one by one.
因此,应用本申请图4所示的实施例,通过子数据包的优先级设置,可以保证优先级高的数据包优先发送,提高待发送数据的发送效率。Therefore, applying the embodiment shown in FIG. 4 of the present application, by setting the priority of the sub-data packet, it can ensure that the data packet with the higher priority is sent first, and the sending efficiency of the data to be sent is improved.
参阅图5和图6所示,是本申请电子装置50一可选的应用环境示意图。Referring to FIG. 5 and FIG. 6, it is a schematic diagram of an optional application environment of the electronic device 50 of the present application.
本实施例中,所述电子装置50可通过有线或无线方式与监管数据上报端模块10以及数据接收端40进行通信。所述电子装置50中,通过网络接口53将所述监管数据上报端模块10的数据发送到数据接收端40中,还可以将所述数据信息通过网络接口53发送于所述数据接收端40的显示界面上,从而实现监管数据上报后数据的传输。In this embodiment, the electronic device 50 can communicate with the supervisory data reporting end module 10 and the data receiving end 40 in a wired or wireless manner. In the electronic device 50, the data of the supervisory data reporting end module 10 is sent to the data receiving end 40 through the network interface 53, and the data information can also be sent to the data receiving end 40 through the network interface 53. On the display interface, so as to realize the data transmission after the supervision data is reported.
参阅图5所示,是本申请电子装置50一可选的硬件架构示意图。电子装置50包括,但不仅限于,可通过系统总线相互通信连接存储器51、处理器52以及网络接口53,图5仅示出了具有组件51-53的电子装置50,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。Refer to FIG. 5, which is a schematic diagram of an optional hardware architecture of the electronic device 50 of the present application. The electronic device 50 includes, but is not limited to, a memory 51, a processor 52, and a network interface 53 that can communicate with each other through a system bus. FIG. 5 only shows the electronic device 50 with components 51-53, but it should be understood that It is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
所述存储器51至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器51可以是所述电子装置50的内部存储单元,例如该电子装置50的硬盘或内存。在另一些实施例中,所述存储器也可以是所述电子装置50的外部存储设备,例如该电子装置50上配备的 插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器51还可以既包括所述电子装置50的内部存储单元也包括其外部存储设备。本实施例中,所述存储器51通常用于存储安装于所述电子装置50的操作系统和各类应用软件,例如监管数据上报端模块10的程序代码等。此外,所述存储器51还可以用于暂时地存储已经输出或者将要输出的各类数据。The memory 51 includes at least one type of readable storage medium. The readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), and static memory. Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disks, optical disks, etc. In some embodiments, the memory 51 may be an internal storage unit of the electronic device 50, such as a hard disk or a memory of the electronic device 50. In other embodiments, the memory may also be an external storage device of the electronic device 50, such as a plug-in hard disk equipped on the electronic device 50, a smart media card (SMC), a secure digital ( Secure Digital, SD card, Flash Card, etc. Of course, the memory 51 may also include both an internal storage unit of the electronic device 50 and an external storage device thereof. In this embodiment, the memory 51 is generally used to store the operating system and various application software installed in the electronic device 50, such as the program code of the supervisory data reporting terminal module 10, etc. In addition, the memory 51 can also be used to temporarily store various types of data that have been output or will be output.
所述处理器52在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器52通常用于控制所述电子装置50的总体操作。本实施例中,所述处理器52用于运行所述存储器51中存储的程序代码或者处理数据,例如运行所述监管数据上报端模块10等。The processor 52 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 52 is generally used to control the overall operation of the electronic device 50. In this embodiment, the processor 52 is used to run the program code or process data stored in the memory 51, for example, to run the supervisory data reporting terminal module 10 and so on.
所述网络接口53可包括无线网络接口或有线网络接口,该网络接口53通常用于在所述电子装置50与其他电子设备之间建立通信连接。The network interface 53 may include a wireless network interface or a wired network interface, and the network interface 53 is generally used to establish a communication connection between the electronic device 50 and other electronic devices.
至此,己经详细介绍了本申请相关设备的硬件结构和功能。下面,将基于上述介绍提出本申请的各个实施例。So far, the hardware structure and functions of the relevant equipment of this application have been introduced in detail. Hereinafter, various embodiments of the present application will be presented based on the above introduction.
首先,本申请提出一种电子装置50。First, this application proposes an electronic device 50.
参阅图5所示,是本申请第一实施例之电子装置50的程序模块示意图。Referring to FIG. 5, it is a schematic diagram of program modules of the electronic device 50 according to the first embodiment of the present application.
本实施例中,所述电子装置50包括一系列的存储于存储器51上的计算机程序指令,当该计算机程序指令被处理器52执行时,可以实现本申请各实施例的监管数据上报操作。在一些实施例中,基于该计算机程序指令各部分所实现的特定的操作,电子装置50可以被划分为一个或多个模块。例如,在图7中,所述电子装置中的监管数据上报端模块10可以被分割成:设定模块501,判断模块502、分包模块503、分配模块504、确定模块505、发送模块506。其中:In this embodiment, the electronic device 50 includes a series of computer program instructions stored on the memory 51. When the computer program instructions are executed by the processor 52, the supervisory data reporting operations of the various embodiments of the present application can be implemented. In some embodiments, the electronic device 50 may be divided into one or more modules based on specific operations implemented by various parts of the computer program instructions. For example, in FIG. 7, the supervisory data reporting end module 10 in the electronic device can be divided into: a setting module 501, a judgment module 502, a subcontracting module 503, an allocation module 504, a determination module 505, and a sending module 506. among them:
设定模块501,用于基于与每一交易方的交易行为存储交易数据,并为每一个交易数据设定标志码;The setting module 501 is used for storing transaction data based on the transaction behavior with each transaction party, and setting a flag code for each transaction data;
判断模块502,用于确定待发送数据,并判断所述待发送数据的大小是否大于第一预设值;The judging module 502 is configured to determine the data to be sent, and judge whether the size of the data to be sent is greater than a first preset value;
分包模块503,用于在所述判断模块的判断结果为是的情况下,对所述待发送数据包进行分包处理,得到多个子数据包,其中,任意一个子数据包的大小均小于第二预设值;The sub-packet module 503 is configured to perform sub-packet processing on the data packet to be sent when the judgment result of the judgment module is yes to obtain multiple sub-data packets, wherein the size of any one of the sub-data packets is less than Second preset value
分配模块504,用于为所述多个子数据包中的每一个数据包分配一个解码标签;An allocating module 504, configured to allocate a decoding label to each data packet of the multiple sub-data packets;
确定模块505,用于确定发送线程;The determining module 505 is used to determine the sending thread;
发送模块506,用于基于所确定的线程个数发送所述子数据包。The sending module 506 is configured to send the sub-data packet based on the determined number of threads.
进一步地,所述分包模块503,包括:Further, the subcontracting module 503 includes:
计算子模块601,用于计算所述待发送数据包的大小与所述第一预设值的倍数值;The calculation sub-module 601 is configured to calculate a multiple of the size of the data packet to be sent and the first preset value;
第一确定子模块602,用于根据预先设置的倍数值与数据包值的关系,确定所计算出来的倍数对应的数据包个数;The first determining submodule 602 is configured to determine the number of data packets corresponding to the calculated multiple according to the relationship between the preset multiple value and the data packet value;
第一划分子模块603,用于根据所确定的数据包个数对所述待发送数据包进行划分;The first dividing submodule 603 is configured to divide the data packet to be sent according to the determined number of data packets;
判断子模块604,用于判断划分后的子数据包大小是否不小于第二预设值;The judging sub-module 604 is used to judge whether the size of the divided sub-data packet is not less than the second preset value;
第二划分子模块605,用于在所述判断子模块的判断结果为是的情况下,再次对该子数据包进行划分。The second division sub-module 605 is configured to divide the sub-data packet again when the judgment result of the judgment sub-module is yes.
进一步地,所述确定模块505具体用于:根据所述待发送数据的大小,确定发送线程。Further, the determining module 505 is specifically configured to determine the sending thread according to the size of the data to be sent.
进一步地,所述确定模块505,包括:Further, the determining module 505 includes:
第二确定子模块701,用于确定当前空闲线程;The second determining submodule 701 is used to determine the current idle thread;
第三确定子模块702,用于基于所述当前空闲线程,确定发送线程数量。The third determining submodule 702 is configured to determine the number of sending threads based on the current idle thread.
进一步地,所述第三确定子模块702,包括:Further, the third determining submodule 702 includes:
第一确定单元801,用于确定当前空闲线程个数;The first determining unit 801 is used to determine the current number of idle threads;
判断单元802,用于判断所述空闲线程个数是否不大于所述倍数值;The judging unit 802 is configured to judge whether the number of idle threads is not greater than the multiple value;
第二确定单元803,用于在所述判断单元的判断结果为是的情况下,将所述当前空闲线程确定为发送线程。The second determining unit 803 is configured to determine the current idle thread as the sending thread when the judgment result of the judgment unit is yes.
进一步地,所述确定模块505,还包括:Further, the determining module 505 further includes:
第四确定子模块901,用于在所述空闲线程个数大于所述倍数值,确定与所述倍数最接近的整数;The fourth determining submodule 901 is configured to determine the integer closest to the multiple when the number of idle threads is greater than the multiple value;
第五确定子模块902,用于将所确定的整数个线程确定为发送线程。The fifth determining submodule 902 is configured to determine the determined integer number of threads as sending threads.
进一步地,所述发送模块506,还包括:Further, the sending module 506 further includes:
排序子模块,用于将所述子数据包进行优先级排序;A sorting sub-module, which is used to prioritize the sub-data packets;
第一发送子模块,用于根据所述优先级,将所述子数据包以及对应的解码标签、标志码存入数据发送队列中;The first sending sub-module is configured to store the sub-data packet and the corresponding decoding tag and flag code in the data sending queue according to the priority;
第二发送子模块,用于通过所确定的线程依次取出并发送所述数据发送队列中的数据。The second sending submodule is used to sequentially take out and send the data in the data sending queue through the determined thread.
相比较现有技术,本申请实施例提供的一种电子装置,之前单一线程大幅节约了时间,完全满足了监管的时效性要求,且通过为子数据包分配解码标签能够在接收到监管数据时进行快速找到相应的子数据包并解码,在解码后还能通过标志码对每一个交易数据进行确认,避免数据丢失。Compared with the prior art, the electronic device provided by the embodiment of the present application greatly saves time in the previous single thread, and fully meets the timeliness requirements of supervision. Moreover, by assigning decoding tags to sub-data packets, it can be used when supervised data is received. Quickly find the corresponding sub-data packet and decode it. After decoding, each transaction data can be confirmed through the mark code to avoid data loss.
本申请还提供一种计算机设备,如可以执行程序的智能手机、平板电脑、笔记本电脑、台式计算机、机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务 器,或者多个服务器所组成的服务器集群)等。本实施例的计算机设备至少包括但不限于:可通过系统总线相互通信连接的存储器、处理器等。This application also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a cabinet server (including independent servers, or more) that can execute programs. A server cluster composed of two servers) and so on. The computer device in this embodiment at least includes, but is not limited to, a memory, a processor, etc. that can be communicatively connected to each other through a system bus.
本实施例还提供一种计算机可读存储介质,该计算机可读存储介质可以是非易失性,也可以是易失性,如闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘、服务器、App应用商城等等,其上存储有计算机程序,程序被处理器执行时实现相应功能。本实施例的计算机可读存储介质用于存储电子装置20,被处理器执行时实现本申请的监管数据上报方法。This embodiment also provides a computer-readable storage medium. The computer-readable storage medium may be non-volatile or volatile, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory). Etc.), random access memory (RAM), static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, Disks, CDs, servers, App application malls, etc., have computer programs stored thereon, and the programs implement corresponding functions when executed by the processor. The computer-readable storage medium of this embodiment is used to store the electronic device 20, and when executed by a processor, realizes the supervision data reporting method of the present application.

Claims (20)

  1. 一种监管数据上报方法,其中,所述方法包括步骤:A method for reporting supervision data, wherein the method includes the steps:
    基于与每一交易方的交易行为存储交易数据,并为每一个交易数据设定标志码;Store transaction data based on transaction behavior with each transaction party, and set a flag code for each transaction data;
    将多个交易数据确定为待发送数据,并判断所述待发送数据的大小是否大于第一预设值;Determining multiple transaction data as data to be sent, and determining whether the size of the data to be sent is greater than a first preset value;
    如果是,对所述待发送数据包进行分包处理,得到多个子数据包,其中,任意一个子数据包的大小均小于第二预设值;If yes, perform sub-packet processing on the to-be-sent data packet to obtain multiple sub-data packets, wherein the size of any one of the sub-data packets is smaller than the second preset value;
    为所述多个子数据包中的每一个数据包分配一个解码标签;Allocating a decoding label to each of the multiple sub-data packets;
    确定发送线程;Determine the sending thread;
    基于所确定的线程发送所述子数据包、解码标签以及标志码。Based on the determined thread, the sub-data packet, the decoded tag, and the flag code are sent.
  2. 根据权利要求1所述的监管数据上报方法,其中,所述对所述待发送数据包进行分包处理,得到多个子数据包的步骤,包括:The supervision data reporting method according to claim 1, wherein the step of sub-packaging the data packet to be sent to obtain a plurality of sub-data packets comprises:
    计算所述待发送数据包的大小与所述第一预设值的倍数值;Calculating a multiple of the size of the data packet to be sent and the first preset value;
    根据预先设置的倍数值与数据包值的关系,确定所计算出来的倍数对应的数据包个数;According to the relationship between the preset multiple value and the data packet value, determine the number of data packets corresponding to the calculated multiple;
    根据所确定的数据包个数对所述待发送数据包进行划分;Dividing the data packets to be sent according to the determined number of data packets;
    判断划分后的子数据包大小是否不小于所述第二预设值;Judging whether the size of the divided sub-data packet is not less than the second preset value;
    如果是,再次对该子数据包进行划分。If so, divide the sub-data packet again.
  3. 根据权利要求2所述的监管数据上报方法,其中,所述确定发送线程的步骤,包括:The method for reporting supervision data according to claim 2, wherein the step of determining the sending thread comprises:
    根据所述待发送子数据包的大小,确定当前空闲线程;Determine the current idle thread according to the size of the sub-data packet to be sent;
    基于所述当前空闲线程,确定发送线程数量。Based on the currently idle threads, the number of sending threads is determined.
  4. 根据权利要求3所述的监管数据上报方法,其中,所述基于所述当前空闲线程,确定发送线程数量的步骤,包括:The method for reporting supervision data according to claim 3, wherein the step of determining the number of sending threads based on the currently idle threads comprises:
    确定当前空闲线程个数;Determine the current number of idle threads;
    判断所述空闲线程个数是否不大于所述倍数值;Judging whether the number of idle threads is not greater than the multiple value;
    如果是,将所述当前空闲线程确定为发送线程。If it is, the currently idle thread is determined as the sending thread.
  5. 根据权利要求4所述的监管数据上报方法,其中,所述方法还包括:The method for reporting regulatory data according to claim 4, wherein the method further comprises:
    在所述空闲线程个数大于所述倍数值,确定与所述倍数最接近的整数;When the number of idle threads is greater than the multiple value, determine the integer closest to the multiple;
    将所确定的整数个线程确定为发送线程。The determined integer number of threads are determined as sending threads.
  6. 根据权利要求1所述的监管数据上报方法,其中,所述基于所确定的线程发送所述子数据包、解码标签以及标志码的步骤,包括:The method for reporting supervision data according to claim 1, wherein the step of sending the sub-data packet, decoding the label and the flag code based on the determined thread comprises:
    将所述子数据包进行优先级排序;Prioritize the sub-data packets;
    根据所述优先级,将所述子数据包以及对应的解码标签、标志码存入数据发送队列中;According to the priority, storing the sub-data packet and the corresponding decoding tag and flag code in the data sending queue;
    通过所确定的线程依次取出并发送所述数据发送队列中的数据。The data in the data sending queue is sequentially taken out and sent through the determined thread.
  7. 一种电子装置,其中,所述装置包括:监管数据上报端模块;An electronic device, wherein the device includes: a supervisory data reporting terminal module;
    其中,所述监管数据上报端模块包括:Wherein, the monitoring data reporting terminal module includes:
    设定模块,用于基于与每一交易方的交易行为存储交易数据,并为每一个交易数据设定标志码;The setting module is used to store transaction data based on the transaction behavior with each transaction party, and set a flag code for each transaction data;
    判断模块,用于将多个交易数据确定为待发送数据,并判断所述待发送数据的大小是否大于第一预设值;A judging module, configured to determine multiple transaction data as data to be sent, and to judge whether the size of the data to be sent is greater than a first preset value;
    分包模块,用于在所述判断模块的判断结果为是的情况下,对所述待发送数据包进行分包处理,得到多个子数据包,其中,任意一个子数据包的大小均小于第二预设值;The sub-packet module is used to perform sub-packet processing on the data packet to be sent when the judgment result of the judging module is yes to obtain multiple sub-data packets, wherein the size of any one sub-data packet is smaller than the first Two preset values;
    解码模块,用于为所述多个子数据包中的每一个数据包分配一个解码标签;A decoding module, configured to assign a decoding label to each of the multiple sub-data packets;
    确定模块,用于确定发送线程;Determine module, used to determine the sending thread;
    发送模块,用于基于所确定的线程个数发送所述子数据包。The sending module is configured to send the sub-data packet based on the determined number of threads.
  8. 根据权利要求7所述的电子装置,其中,所述分包模块具体包括:The electronic device according to claim 7, wherein the subcontracting module specifically comprises:
    计算子模块,用于计算所述待发送数据包的大小与所述第一预设值的倍数值;A calculation sub-module, configured to calculate a multiple of the size of the data packet to be sent and the first preset value;
    第一确定子模块,用于根据预先设置的倍数值与数据包值的关系,确定所计算出来的倍数对应的数据包个数;The first determining sub-module is configured to determine the number of data packets corresponding to the calculated multiple according to the relationship between the preset multiple value and the data packet value;
    第一划分子模块,用于根据所确定的数据包个数对所述待发送数据包进行划分;The first dividing submodule is configured to divide the data packet to be sent according to the determined number of data packets;
    判断子模块,用于判断划分后的子数据包大小是否不小于第二预设值;The judging sub-module is used to judge whether the size of the divided sub-data packet is not less than the second preset value;
    第二划分子模块,用于在所述判断子模块的判断结果为是的情况下,再次对该子数据包进行划分。The second division sub-module is configured to divide the sub-data packet again when the judgment result of the judgment sub-module is yes.
  9. 一种设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现监管数据上报方法,所述监管数据上报方法具体包括如下步骤:A device includes a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the processor implements a monitoring data reporting method when the processor executes the computer program, and the monitoring data reporting method is specifically Including the following steps:
    基于与每一交易方的交易行为存储交易数据,并为每一个交易数据设定标志码;Store transaction data based on transaction behavior with each transaction party, and set a flag code for each transaction data;
    将多个交易数据确定为待发送数据,并判断所述待发送数据的大小是否大于第一预设值;Determining multiple transaction data as data to be sent, and determining whether the size of the data to be sent is greater than a first preset value;
    如果是,对所述待发送数据包进行分包处理,得到多个子数据包,其中,任意一个子数据包的大小均小于第二预设值;If yes, perform sub-packet processing on the to-be-sent data packet to obtain multiple sub-data packets, wherein the size of any one of the sub-data packets is smaller than the second preset value;
    为所述多个子数据包中的每一个数据包分配一个解码标签;Allocating a decoding label to each of the multiple sub-data packets;
    确定发送线程;Determine the sending thread;
    基于所确定的线程发送所述子数据包、解码标签以及标志码。Based on the determined thread, the sub-data packet, the decoded tag, and the flag code are sent.
  10. 根据权利要求9所述的设备,其中,所述对所述待发送数据包进行分包处理,得到多个子数据包的步骤,包括:The device according to claim 9, wherein the step of sub-packaging the data packet to be sent to obtain a plurality of sub-data packets comprises:
    计算所述待发送数据包的大小与所述第一预设值的倍数值;Calculating a multiple of the size of the data packet to be sent and the first preset value;
    根据预先设置的倍数值与数据包值的关系,确定所计算出来的倍数对应的数据包个数;According to the relationship between the preset multiple value and the data packet value, determine the number of data packets corresponding to the calculated multiple;
    根据所确定的数据包个数对所述待发送数据包进行划分;Dividing the data packets to be sent according to the determined number of data packets;
    判断划分后的子数据包大小是否不小于所述第二预设值;Judging whether the size of the divided sub-data packet is not less than the second preset value;
    如果是,再次对该子数据包进行划分。If so, divide the sub-data packet again.
  11. 根据权利要求10所述的设备,其中,所述确定发送线程的步骤,包括:The device according to claim 10, wherein the step of determining the sending thread comprises:
    根据所述待发送子数据包的大小,确定当前空闲线程;Determine the current idle thread according to the size of the sub-data packet to be sent;
    基于所述当前空闲线程,确定发送线程数量。Based on the currently idle threads, the number of sending threads is determined.
  12. 根据权利要求11所述的设备,其中,所述基于所述当前空闲线程,确定发送线程数量的步骤,包括:The device according to claim 11, wherein the step of determining the number of sending threads based on the currently idle threads comprises:
    确定当前空闲线程个数;Determine the current number of idle threads;
    判断所述空闲线程个数是否不大于所述倍数值;Judging whether the number of idle threads is not greater than the multiple value;
    如果是,将所述当前空闲线程确定为发送线程。If it is, the currently idle thread is determined as the sending thread.
  13. 根据权利要求12所述的设备,其中,所述方法还包括:The device according to claim 12, wherein the method further comprises:
    在所述空闲线程个数大于所述倍数值,确定与所述倍数最接近的整数;When the number of idle threads is greater than the multiple value, determine the integer closest to the multiple;
    将所确定的整数个线程确定为发送线程。The determined integer number of threads are determined as sending threads.
  14. 根据权利要求11所述的设备,其中,所述基于所确定的线程发送所述子数据包、解码标签以及标志码的步骤,包括:The device according to claim 11, wherein the step of sending the sub-data packet, decoding the label and the flag code based on the determined thread comprises:
    将所述子数据包进行优先级排序;Prioritize the sub-data packets;
    根据所述优先级,将所述子数据包以及对应的解码标签、标志码存入数据发送队列中;According to the priority, storing the sub-data packet and the corresponding decoding tag and flag code in the data sending queue;
    通过所确定的线程依次取出并发送所述数据发送队列中的数据。The data in the data sending queue is sequentially taken out and sent through the determined thread.
  15. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现监管数据上报方法,其中,所述监管数据上报方法具体包括如下步骤:A computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement a monitoring data reporting method, wherein the monitoring data reporting method specifically includes the following steps:
    基于与每一交易方的交易行为存储交易数据,并为每一个交易数据设定标志码;Store transaction data based on transaction behavior with each transaction party, and set a flag code for each transaction data;
    将多个交易数据确定为待发送数据,并判断所述待发送数据的大小是否大于第一预设值;Determining multiple transaction data as data to be sent, and determining whether the size of the data to be sent is greater than a first preset value;
    如果是,对所述待发送数据包进行分包处理,得到多个子数据包,其中,任意一个子数据包的大小均小于第二预设值;If yes, perform sub-packet processing on the to-be-sent data packet to obtain multiple sub-data packets, wherein the size of any one of the sub-data packets is smaller than the second preset value;
    为所述多个子数据包中的每一个数据包分配一个解码标签;Allocating a decoding label to each of the multiple sub-data packets;
    确定发送线程;Determine the sending thread;
    基于所确定的线程发送所述子数据包、解码标签以及标志码。Based on the determined thread, the sub-data packet, the decoded tag, and the flag code are sent.
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述对所述待发送数据包进行分包处理,得到多个子数据包的步骤,包括:The computer-readable storage medium according to claim 15, wherein the step of sub-packaging the data packet to be sent to obtain a plurality of sub-data packets comprises:
    计算所述待发送数据包的大小与所述第一预设值的倍数值;Calculating a multiple of the size of the data packet to be sent and the first preset value;
    根据预先设置的倍数值与数据包值的关系,确定所计算出来的倍数对应的数据包个数;According to the relationship between the preset multiple value and the data packet value, determine the number of data packets corresponding to the calculated multiple;
    根据所确定的数据包个数对所述待发送数据包进行划分;Dividing the data packets to be sent according to the determined number of data packets;
    判断划分后的子数据包大小是否不小于所述第二预设值;Judging whether the size of the divided sub-data packet is not less than the second preset value;
    如果是,再次对该子数据包进行划分。If so, divide the sub-data packet again.
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述确定发送线程的步骤,包括:The computer-readable storage medium according to claim 16, wherein the step of determining the sending thread comprises:
    根据所述待发送子数据包的大小,确定当前空闲线程;Determine the current idle thread according to the size of the sub-data packet to be sent;
    基于所述当前空闲线程,确定发送线程数量。Based on the currently idle threads, the number of sending threads is determined.
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述基于所述当前空闲线程,确定发送线程数量的步骤,包括:18. The computer-readable storage medium according to claim 17, wherein the step of determining the number of sending threads based on the currently idle threads comprises:
    确定当前空闲线程个数;Determine the current number of idle threads;
    判断所述空闲线程个数是否不大于所述倍数值;Judging whether the number of idle threads is not greater than the multiple value;
    如果是,将所述当前空闲线程确定为发送线程。If it is, the currently idle thread is determined as the sending thread.
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述方法还包括:The computer-readable storage medium of claim 18, wherein the method further comprises:
    在所述空闲线程个数大于所述倍数值,确定与所述倍数最接近的整数;When the number of idle threads is greater than the multiple value, determine the integer closest to the multiple;
    将所确定的整数个线程确定为发送线程。The determined integer number of threads are determined as sending threads.
  20. 根据权利要求15所述的计算机可读存储介质,其中,所述基于所确定的线程发送所述子数据包、解码标签以及标志码的步骤,包括:15. The computer-readable storage medium according to claim 15, wherein the step of sending the sub-data packet, decoding the label and the flag code based on the determined thread comprises:
    将所述子数据包进行优先级排序;Prioritize the sub-data packets;
    根据所述优先级,将所述子数据包以及对应的解码标签、标志码存入数据发送队列中;According to the priority, storing the sub-data packet and the corresponding decoding tag and flag code in the data sending queue;
    通过所确定的线程依次取出并发送所述数据发送队列中的数据。The data in the data sending queue is sequentially taken out and sent through the determined thread.
PCT/CN2020/087938 2019-08-30 2020-04-30 Supervision data reporting, electronic apparatus, device and computer-readable storage medium WO2021036321A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910814524.7A CN110602004A (en) 2019-08-30 2019-08-30 Supervision data reporting, electronic device, equipment and computer readable storage medium
CN201910814524.7 2019-08-30

Publications (1)

Publication Number Publication Date
WO2021036321A1 true WO2021036321A1 (en) 2021-03-04

Family

ID=68857014

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/087938 WO2021036321A1 (en) 2019-08-30 2020-04-30 Supervision data reporting, electronic apparatus, device and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN110602004A (en)
WO (1) WO2021036321A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114666321A (en) * 2022-03-21 2022-06-24 中国建设银行股份有限公司 Supervision submission data processing method, device, equipment, medium and product
CN114666321B (en) * 2022-03-21 2024-04-26 中国建设银行股份有限公司 Supervision report data processing method, device, equipment, medium and product

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110602004A (en) * 2019-08-30 2019-12-20 深圳壹账通智能科技有限公司 Supervision data reporting, electronic device, equipment and computer readable storage medium
CN111314230A (en) * 2020-01-16 2020-06-19 深圳壹账通智能科技有限公司 Data reporting and receiving method, electronic device, computer equipment and storage medium
CN116112712B (en) * 2023-01-12 2023-09-26 联通沃音乐文化有限公司 Self-adaptive video-audio video transmission playing method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114867A (en) * 2006-07-25 2008-01-30 深圳Tcl工业研究院有限公司 Multi-channel synchronization transmitting method and system
CN101656751A (en) * 2008-08-18 2010-02-24 北京数码大方科技有限公司 Method and system for accelerating file uploading and downloading
CN106411560A (en) * 2016-06-01 2017-02-15 深圳市永兴元科技有限公司 Data transmission method and device
WO2017059775A1 (en) * 2015-10-06 2017-04-13 Huawei Technologies Co., Ltd. Method and apparatus for adaptive packet aggregation
CN108471399A (en) * 2018-02-07 2018-08-31 平安科技(深圳)有限公司 Generation method, storage medium and the server of data packet in a kind of anti money washing operation
CN110602004A (en) * 2019-08-30 2019-12-20 深圳壹账通智能科技有限公司 Supervision data reporting, electronic device, equipment and computer readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7567508B2 (en) * 2005-05-23 2009-07-28 Cisco Technology, Inc. Method and system for providing delay bound and priortized packet dropping
CN107707640A (en) * 2017-09-25 2018-02-16 深圳市盛路物联通讯技术有限公司 A kind of Point-to-Point Data Transmission method and apparatus
CN108965112A (en) * 2018-08-09 2018-12-07 江苏神州信源系统工程有限公司 The method and device of file transmission is carried out using instant message applications

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114867A (en) * 2006-07-25 2008-01-30 深圳Tcl工业研究院有限公司 Multi-channel synchronization transmitting method and system
CN101656751A (en) * 2008-08-18 2010-02-24 北京数码大方科技有限公司 Method and system for accelerating file uploading and downloading
WO2017059775A1 (en) * 2015-10-06 2017-04-13 Huawei Technologies Co., Ltd. Method and apparatus for adaptive packet aggregation
CN106411560A (en) * 2016-06-01 2017-02-15 深圳市永兴元科技有限公司 Data transmission method and device
CN108471399A (en) * 2018-02-07 2018-08-31 平安科技(深圳)有限公司 Generation method, storage medium and the server of data packet in a kind of anti money washing operation
CN110602004A (en) * 2019-08-30 2019-12-20 深圳壹账通智能科技有限公司 Supervision data reporting, electronic device, equipment and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114666321A (en) * 2022-03-21 2022-06-24 中国建设银行股份有限公司 Supervision submission data processing method, device, equipment, medium and product
CN114666321B (en) * 2022-03-21 2024-04-26 中国建设银行股份有限公司 Supervision report data processing method, device, equipment, medium and product

Also Published As

Publication number Publication date
CN110602004A (en) 2019-12-20

Similar Documents

Publication Publication Date Title
WO2021036321A1 (en) Supervision data reporting, electronic apparatus, device and computer-readable storage medium
US10963962B2 (en) Offload processing of data packets containing financial market data
US20220255884A1 (en) System and method for facilitating efficient utilization of an output buffer in a network interface controller (nic)
US9860176B2 (en) Data packet processing
CN102301664B (en) Method and device for dispatching streams of multicore processor
CN107729137A (en) Server, the method and storage medium of the decryption of block chain sign test
CN110831039A (en) Data transmission method and transmission server in multi-path concurrent system
CN109547356B (en) Data transmission method, system and equipment for electric energy metering and computer storage medium
WO2024016596A1 (en) Container cluster scheduling method and apparatus, device, and storage medium
CN115037700A (en) Complex network data packet transmission method, system, terminal and storage medium
CN102609307A (en) Multi-core multi-thread dual-operating system network equipment and control method thereof
CN103634223A (en) Network service flow based dynamic control transmission method and device
CN112799824A (en) Current limiting method, device, equipment and storage medium
WO2019109902A1 (en) Queue scheduling method and apparatus, communication device, and storage medium
CN112887407B (en) Job flow control method and device for distributed cluster
US9268621B2 (en) Reducing latency in multicast traffic reception
US9282041B2 (en) Congestion profiling of computer network devices
CN110247854B (en) Multi-level service scheduling method, scheduling system and scheduling controller
CN102143053A (en) Method, device and system for transmitting data
US20230063599A1 (en) Edge computing network, data transmission method and apparatus, device and storage medium
CN107229424B (en) Data writing method for distributed storage system and distributed storage system
CN102739531A (en) Traffic shaping method and traffic shaping equipment
US9338219B2 (en) Direct push operations and gather operations
US10182019B2 (en) Interconnected hardware infrastructure resource control
CN114090409A (en) Message processing method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20859496

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 01/07/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20859496

Country of ref document: EP

Kind code of ref document: A1