CN106730823A - The method and device that a kind of data are quickly received and dispatched - Google Patents

The method and device that a kind of data are quickly received and dispatched Download PDF

Info

Publication number
CN106730823A
CN106730823A CN201611075314.3A CN201611075314A CN106730823A CN 106730823 A CN106730823 A CN 106730823A CN 201611075314 A CN201611075314 A CN 201611075314A CN 106730823 A CN106730823 A CN 106730823A
Authority
CN
China
Prior art keywords
data
transceiver module
transmitting
receiving
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201611075314.3A
Other languages
Chinese (zh)
Other versions
CN106730823B (en
Inventor
李华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jingchuang Technology Electronics Co.,Ltd.
Original Assignee
SHENZHEN KING CHUANG TECH & ELECTRONIC Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN KING CHUANG TECH & ELECTRONIC Co Ltd filed Critical SHENZHEN KING CHUANG TECH & ELECTRONIC Co Ltd
Priority to CN201611075314.3A priority Critical patent/CN106730823B/en
Publication of CN106730823A publication Critical patent/CN106730823A/en
Application granted granted Critical
Publication of CN106730823B publication Critical patent/CN106730823B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/20Input arrangements for video game devices
    • A63F13/24Constructional details thereof, e.g. game controllers with detachable joystick handles
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/20Input arrangements for video game devices
    • A63F13/23Input arrangements for video game devices for interfacing with the game device, e.g. specific interfaces between game controller and console
    • A63F13/235Input arrangements for video game devices for interfacing with the game device, e.g. specific interfaces between game controller and console using a wireless connection, e.g. infrared or piconet
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The method that embodiment of the present invention discloses a kind of quick transceiving data of game paddle, it is characterised in that the game paddle is provided with the first transceiver module and the second transceiver module, methods described includes:For the game paddle builds application main thread and transmitting-receiving by-pass journey;When the application main thread needs to send data, the transmitting-receiving by-pass journey is set to be transmitted the data by the mutual cooperation of first transceiver module and second transceiver module;When first transceiver module and second transceiver module receive data, the transmitting-receiving by-pass journey is set to verify the data that first transceiver module and second transceiver module are received, and when the data check passes through, by the data is activation to application main thread.Through the above way, embodiment of the present invention can improve the transmitting efficiency of data, save the time, and also carry out safety check to data after the completion of receiving and dispatching, and reach the effect that data are not lost.

Description

The method and device that a kind of data are quickly received and dispatched
Technical field
Embodiment of the present invention is related to data transmit-receive field, method and dress that more particularly to a kind of data are quickly received and dispatched Put.
Background technology
Current wireless controller is mainly penetrated and reading manner using directly transmitting-receiving, and wireless module must first launch again etc. to be received Respond.And the data launched have to wait for being received back to all spend a lot of time, application program only has wait operation completion After can perform next step operation.The transmitting-receiving for completing 1 data is about 700ms or so, and main application is typically all directly to adjust Operated with this, then using will user waiting prompt, data receive and penetrate.Now user cannot carry out any operation, so that The smooth degree of game operation is influenceed, satisfaction of users decline is directly resulted in.
The content of the invention
Embodiment of the present invention is mainly solving the technical problems that provide a kind of method and device of the quick transmitting-receiving of data, energy It is enough.
In order to solve the above technical problems, the technical scheme that embodiment of the present invention is used is:A kind of game hand is provided The method of the quick transceiving data of handle, game paddle is provided with the first transceiver module and the second transceiver module, and method includes:It is game Handle builds application main thread and transmitting-receiving by-pass journey;When main thread needs to send data, transmitting-receiving by-pass journey is passed through first and receive The mutual cooperation for sending out module and the second transceiver module is transmitted data;When the first transceiver module and the second transceiver module receive number According to when, transmitting-receiving by-pass journey is verified to the data that the first transceiver module and the second transceiver module are received, and in data school Test by when, send data to and apply main thread.
Wherein, the processing priority of the first transceiver module is preferential less than the treatment of the second transceiver module;When main thread needs When sending data, transmitting-receiving by-pass journey is set to be transmitted packet by the mutual cooperation of the first transceiver module and the second transceiver module Include:When application main thread needs to send data, make to be sent using main thread and perform message and give presetting message list, and by data Copy level cache to;Make transmitting-receiving by-pass journey according to fifo algorithm, extract message from presetting message list and delay one-level The data copy corresponding with message that is extracting that be depositing is eliminated and performs message in L2 cache;Make transmitting-receiving by-pass journey root According to the processing priority principle and idle principle of the first transceiver module and the second transceiver module successively by the data in L2 cache Copy to and be transmitted data in the first transceiver module or the second transceiver module.
Wherein, by-pass journey is made according to the processing priority principle of the first transceiver module and the second transceiver module and idle principle Data will be transmitted in the data copy in L2 cache to the first transceiver module or the second transceiver module successively includes:From A data are extracted in L2 cache, data number mark is added in the head of a data, and using a data as due-in data; Judge the first transceiver module and the second transceiver module with the presence or absence of the free time;When the first transceiver module and the second transceiver module are only existed One transceiver module of free time, by due-in data is activation to idle transceiver module, transmitting-receiving is carried out by idle transceiver module Reason, or, when the first transceiver module and the second transceiver module are idle, by due-in data is activation to the second transceiver module, by Second transceiver module carries out transmitting-receiving process;When the first transceiver module or the second transceiver module complete the reception processing to a data Afterwards, next data are extracted from L2 cache, and the data number of next data is identified according to the data number of data Mark is incremented by, and once data as due-in data, and will be returned and be judged that the first transceiver module and the second transceiver module are It is no to there is idle step.
Wherein, when main thread needs to send data, transmitting-receiving by-pass journey is made to pass through the first transceiver module and the second transmitting-receiving mould The mutual cooperation of block is transmitted data to be included:The first data are extracted from L2 cache, data are added in the first data header Number-mark;First data distribution is processed to the second transceiver module;The second data are extracted from L2 cache, second Data header adds data number mark, wherein, the data number added in the second data header is identified according to the first data Data number mark is incremented by;Judge whether the second data and the first data are identical datas;If identical, is assigned to Two transceiver modules are processed;Such as difference, then it is assigned to the first transceiver module and is processed;The 3rd is extracted from L2 cache to count According to the data number mark added in the 3rd data header is incremented by according to the data number mark of the second data;Judge Whether three data are identical datas with the first data and the second data;Such as with the first data and the second data in one of them be Identical data, the transceiver module that the 3rd data distribution is received and dispatched to same data is together received and dispatched;Such as with both Difference, then wait the first transceiver module and the second transmitting-receiving module to be processed again in the free time.
Wherein, when the first transceiver module and the second transceiver module receive data, transmitting-receiving by-pass journey is to the first transceiver module Carrying out verification with the data that the second transceiver module is received includes:It is superfluous that afterbody in data before transceiving data adds circulation Remaining check code;When first transceiver module and the second transceiver module receive data, transmitting-receiving by-pass journey is to the first transceiver module and second The data that transceiver module is received are verified.
In order to solve the above technical problems, another technical scheme that embodiment of the present invention is used is:A kind of game is provided The device of the quick transceiving data of handle, game paddle is provided with the first transceiver module and the second transceiver module, including:Build mould Block, for building application main thread and transmitting-receiving by-pass journey for game paddle;Sending module, for needing to send data when main thread When, transmitting-receiving by-pass journey is transmitted data by the mutual cooperation of the first transceiver module and the second transceiver module;Correction verification module, For when the first transceiver module and the second transceiver module receive data, transmitting-receiving by-pass journey to be received and dispatched to the first transceiver module and second The data that module is received are verified, and when data check passes through, are sent data to and applied main thread.
Wherein, the processing priority of the first transceiver module is preferential less than the treatment of the second transceiver module, and sending module includes: Transmitting element, for when application main thread needs to send data, making to be arranged to presetting message using main thread transmission execution message Table, and by data copy to level cache;First extraction unit, for making transmitting-receiving by-pass journey according to fifo algorithm, from pre- If messaging list extracts message and by the data copy corresponding with the message extracted in level cache to L2 cache, Eliminate and perform message;Copy cell, it is excellent according to the treatment of the first transceiver module and the second transceiver module for making transmitting-receiving by-pass journey First level principle and idle principle are successively by the data copy in L2 cache to the first transceiver module or the second transceiver module It is transmitted data.
Wherein, copy cell includes:Subelement is extracted, for extracting a data from L2 cache, in the head of a data Portion adds data number mark, and using a data as due-in data;Judgment sub-unit, for judge the first transceiver module and Second transceiver module is with the presence or absence of the free time;Transmission sub-unit, for only existing one when the first transceiver module and the second transceiver module Individual idle transceiver module, by due-in data is activation to idle transceiver module, transmitting-receiving process is carried out by idle transceiver module, Or, when the first transceiver module and idle the second transceiver module, by due-in data is activation to the second transceiver module, by second Transceiver module carries out transmitting-receiving process;Subelement is extracted, for completing to be counted to one when the first transceiver module or the second transceiver module According to reception processing after, extract next data from L2 cache, and the data number of next data is identified according to number According to data number mark be incremented by, once data as due-in data, and will return and judge the first transceiver module and the Two transceiver modules are with the presence or absence of idle step.
Wherein, sending module includes:Second extraction unit, for extracting the first data from L2 cache, in the first number Data number is added to identify according to head;First allocation unit, for the first data distribution to be processed to the second transceiver module; 3rd extraction unit, for extracting the second data from L2 cache, data number mark is added in the second data header, its In, the data number mark added in the second data header is incremented by according to the data number mark of the first data;First sentences Disconnected unit, for judging whether the second data and the first data are identical datas;Second allocation unit, if for the second data It is identical with the first data, then it is assigned to the second transceiver module and is processed;3rd allocation unit, for such as the second data and first Data are different, then be assigned to the first transceiver module and processed;4th extraction unit, counts for extracting the 3rd from L2 cache According to the data number mark added in the 3rd data header is incremented by according to the data number mark of the second data;Second sentences Disconnected unit, for judging whether the 3rd data are identical datas with the first data and the second data;4th allocation unit, for such as It is identical data with one of them in the first data and the second data, the 3rd data distribution is carried out to same data The transceiver module of transmitting-receiving is together received and dispatched;5th allocation unit, for such as with it is neither same, then wait the first transceiver module and the Two transmitting-receiving modules are processed again in the free time.
Wherein, correction verification module also includes:Adding device, circulation is added for the afterbody in data before transceiving data Redundancy check code;Verification unit, when receiving data for the first transceiver module and the second transceiver module, transmitting-receiving by-pass journey is to first The data that transceiver module and the second transceiver module are received are verified.
The beneficial effect of embodiment of the present invention is:The situation of prior art is different from, embodiment of the present invention provides one The method for planting the quick transceiving data of game paddle, when the main thread needs to send data, passes through the transmitting-receiving by-pass journey The mutual cooperation of first transceiver module and second transceiver module is transmitted the data can be realized to the fast of data Speed sends, and improves the transmitting efficiency of data, saves the time, and also carries out safety check to data after the completion of receiving and dispatching, and reaches To the effect that data are not lost.
Brief description of the drawings
Fig. 1 is the schematic diagram of the first embodiment of the method that a kind of data that the present invention is provided quickly are received and dispatched
Fig. 2 is the flow chart of the second embodiment of the method that a kind of data that the present invention is provided quickly are received and dispatched;
Fig. 3 be the present invention provide a kind of data quickly transmitting-receiving method second embodiment in dual-thread coordinate send The flow chart of data;
Fig. 4 be the present invention provide a kind of data quickly transmitting-receiving method second embodiment in single module transmitting-receiving algorithm Flow chart;
Fig. 5 be the present invention provide a kind of data quickly transmitting-receiving method second embodiment in Dual module transmitting-receiving algorithm Flow chart;
Fig. 6 is the schematic diagram of the first embodiment of the device that a kind of data that the present invention is provided quickly are received and dispatched;
Fig. 7 is the schematic diagram of the first embodiment of the device that a kind of data that the present invention is provided quickly are received and dispatched;
Fig. 8 is the schematic diagram of the game paddle that the present invention performs the method that data are quickly received and dispatched.
Specific embodiment
It should be noted that the executive agent of the method for the quick transmitting-receiving of data provided in an embodiment of the present invention is wireless double-core Handle.
Refering to Fig. 1, Fig. 1 is the flow of the first embodiment of the method that a kind of data that the present invention is provided quickly are received and dispatched Figure.Game paddle 40 is provided with the first transceiver module 41, the second transceiver module 42 and MCU controllers 43, is wrapped in MCU controllers 43 Include main thread 431 and by-pass journey 432.When the main thread 431 needs to send data, main thread 431 and by-pass journey phase interworking Conjunction assigns data to the transceiver module 42 of first transceiver module 41 and second, and first transceiver module 41 is then passed through again And the second mutual cooperation between transceiver module 42 is transmitted data to external reception end 50.When first transceiver module 41 When receiving data with the second transceiver module 42, first transceiver module of the by-pass journey 432 pairs and the second transceiver module are received To data verified, and when the data check passes through, by the data is activation to main thread 431.Need explanation , receiving terminal 50 can be game paddle, or server or mobile terminal etc..
In embodiments of the present invention, when the main thread needs to send data, the transmitting-receiving by-pass journey is made by described The mutual cooperation of the first transceiver module and second transceiver module is transmitted the quick hair that the data can be realized to data Send, improve the transmitting efficiency of data, save the time, and safety check also is carried out to data after the completion of receiving and dispatching, reach number According to the effect do not lost.
Fig. 2 is referred to, Fig. 2 is the flow of the second embodiment of the method that a kind of data that the present invention is provided quickly are received and dispatched Figure, the game paddle is provided with the first transceiver module and the second transceiver module, and the method that data are quickly received and dispatched includes:
11:For the game paddle builds application main thread and transmitting-receiving by-pass journey;
The application main thread of structure and transmitting-receiving by-pass Cheng Jun in MCU controllers, in order to solve asking for game operation wait Topic, receives data and first sends out message to pair using the asynchronous receiving-transmitting mode for building application main thread and transmitting-receiving by-pass journey, i.e. main thread Thread, the execution efficiency for allowing by-pass journey to perform time-consuming operation to improve main thread reaches the raising affected smooth degree of game Effect.
12:When the application main thread needs to send data, make the transmitting-receiving by-pass journey by the described first transmitting-receiving mould The mutual cooperation of block and second transceiver module is transmitted the data;
When game paddle is initialized, MCU controllers are by direct with maximum transmitting-receiving space needed for module by wireless module It is passed in MCU controller internal memories, further according to the configuring condition of each module, is automatically divided module, by module Divide, the processing priority that can obtain first transceiver module is preferential less than the treatment of second transceiver module, so again When carrying out processing data transmitting-receiving, the second transceiver module is first transferred data to, if the second transceiver module no free time is again by number Processed according to the first module is transmitted to, data can so sequential received and dispatched in transmitting-receiving, it is possible to achieve quick number According to transmitting-receiving, it is necessary to explanation, the first transceiver module and the second transceiver module are non-interfering.
13:When first transceiver module and second transceiver module receive data, make the transmitting-receiving by-pass journey pair The data that first transceiver module and second transceiver module are received are verified, and are passed through in the data check When, by the data is activation to application main thread;
The transmitting-receiving of either the first transceiver module or the second transceiver module are received and dispatched, and can all be caused during transmitting-receiving There is exception or situation about being destroyed in data, in order to protect the integrality and robustness of data, when data are received, and profit With transmitting-receiving by-pass journey carry out the verification of data, and realize data verification be by data afterbody add CRC Code, the integrality of data is realized by verifying this check code, when data check is obstructed out-of-date, then abandons this data, then to it He is verified data, it is known that data check success, then successful data are returned into upper layer application, then successful data is rewritten In entering module, discharge data exception reaches that a data are newest, and many parts of effects of data backup fully ensure the stalwartness of data Property.
In embodiments of the present invention, when the main thread needs to send data, the transmitting-receiving by-pass journey is made by described The mutual cooperation of the first transceiver module and second transceiver module is transmitted the quick hair that the data can be realized to data Send, improve the transmitting efficiency of data, save the time, and safety check also is carried out to data after the completion of receiving and dispatching, reach number According to the effect do not lost.
Refer to Fig. 3, Fig. 3 is a kind of data for providing of the present invention quickly two-wire in the second embodiment of the method for transmitting-receiving Cheng Peihe sends the flow chart of data, specifically, step 12 includes:
121:When the application main thread needs to send data, send the application main thread and perform message to default Messaging list, and by the data copy to level cache;
Presetting message list is pre-created, for storing the message that main thread sends.Perform message and application master The thread data to be sent are one-to-one, and data are corresponded to when convenient transmitting-receiving by-pass journey performs message by finding. Using main thread by data copy to level cache, it is therefore an objective to be the internal storage data of isolation applications, high frequency transmitting-receiving process is reduced In to the locking of the long-time of application memory.
122:Make the transmitting-receiving by-pass journey according to fifo algorithm, message is extracted and by institute from the presetting message list The data copy corresponding with the message extracted in level cache is stated in L2 cache, the execution is eliminated and is disappeared Breath;
It should be noted that transmitting-receiving by-pass journey can inquire about presetting message list when the free time, it is not to inquire about constantly. It is that data are transported in transfer that the purpose that transmitting-receiving by-pass journey copies from level cache data in L2 cache is, reduces bottom pair The degree of coupling of application data internal memory.It is to ensure that presetting message list is always maintained at that the execution message is eliminated after copy Last state, in the absence of message useless.
123:Make the transmitting-receiving by-pass journey according to the processing priority principle of the first transceiver module and the second transceiver module and Idle principle will be sent out in the data copy in L2 cache to the first transceiver module or the second transceiver module successively Send data;
L2 cache is copied to from level cache, then copy transceiver module to from L2 cache by by a data Received and dispatched, reach carries out a process for sequence by data, make data orderly, have a time interval carry out completion hair Send, which decrease the degree of coupling to transceiver module using main thread, improve using the smooth degree of game operation.
In embodiments of the present invention, by when the main thread needs to send data, first delaying data copy to one-level In depositing, transmitting-receiving by-pass journey again copies from level cache data in L2 cache, then data are copied from L2 cache Processed in transceiver module, data is formd the process of transfer in the buffer, data has been reached an arrangement Process, which decrease using main thread to the degree of coupling of transceiver module, improve using the smooth degree of game operation.
Refer to Fig. 4, Fig. 4 is a kind of data for providing of the present invention quickly single mode in the second embodiment of the method for transmitting-receiving Block receives and dispatches the flow chart of algorithm, specifically, step 123 includes:
1231:A data are extracted from the L2 cache, data number mark is added in the head of a data, and And using a data as due-in data;
Data are numbered with mark, be in order to distinguish data, while also to verification when it is convenient to correct data and The differentiation of wrong data, prevents from obscuring, and loses mistake.
1232:Judge first transceiver module and the second transceiver module with the presence or absence of the free time;
1233:When first transceiver module and the second transceiver module only exist the transceiver module of free time, will be described Due-in data is activation carries out transmitting-receiving process to idle transceiver module by idle transceiver module, or, when the described first transmitting-receiving When module and idle the second transceiver module, by the due-in data is activation to the second transceiver module, by the described second transmitting-receiving mould Block carries out transmitting-receiving process;
Due to when being divided to module, the processing priority of the second transceiver module being set above into the first transmitting-receiving mould Block, so when the second transceiver module is idle, first the second transceiver module is processed.
1234:When first transceiver module or the second transceiver module complete to the reception processing of a data it Afterwards, next data are extracted from the L2 cache, and the data number of next data is identified according to the data Data number mark be incremented by, will the data once as due-in data, and return and judge that described first receives and dispatches mould Block and the second transceiver module are with the presence or absence of idle step;
Carry out the treatment to data by using a transceiver module, it is to avoid each writing module is required for performing and once receives The operation of module is sent out, data transmit-receive speed is greatly improved, the utilization rate of module is improve.
In embodiments of the present invention, by when the main thread in order by data transmission one by one to receiving and dispatching mould Block is processed, and is performed using a transceiver module, has so both improve game operation smoothness degree, be turn avoid and is write every time Module is required for performing an operation for transceiver module, greatly improves data transmit-receive speed, improves the utilization rate of module.
Refer to Fig. 5, Fig. 5 is a kind of data for providing of the present invention quickly bimodulus in the second embodiment of the method for transmitting-receiving Block receives and dispatches the flow chart of algorithm, specifically, step 12 also includes:
124:The first data are extracted from the L2 cache, data number mark is added in first data header;
Equally, data are numbered with mark, be in order to distinguish data, while also to verification when conveniently align exact figures According to the differentiation with wrong data, prevent from obscuring, lose mistake.
125:First data distribution is processed to the second transceiver module;
126:The second data are extracted from the L2 cache, data number mark are added in second data header, Wherein, the data number mark for being added in second data header is incremented by according to the data number mark of the first data;
127:Judge whether second data and first data are identical datas;
128:If identical, it is assigned to the second transceiver module and is processed;
129:Such as difference, then it is assigned to the first transceiver module and is processed;
120:The 3rd data are extracted from the L2 cache, in the data number mark that the 3rd data header is added Data number mark according to the second data is incremented by;
1201:Judge whether the 3rd data are identical datas with first data and second data;
1202:Such as with first data and second data in one of them be identical data, by the described 3rd The transceiver module that data distribution is received and dispatched to same data is together received and dispatched;
1203:Such as located again in idle with the first transceiver module and the second transmitting-receiving module neither together, is then waited Reason;
Identical data are processed using same transceiver module, the data distribution for differing to another transmitting-receiving mould Block is processed, and can so reduce the write-in number of times of module, lifts the speed of transceiver module transceiving data.
In embodiments of the present invention, by the mutual cooperation between the first transceiver module and the second transceiver module, from two When extracting data in level caching, first judge whether this data and data before are identical, if any identical, be assigned to same receipts Hair module is processed, and which reduces the write-in number of times of module, improves the speed of transceiver module transceiving data.
Fig. 6 is referred to, Fig. 6 is the signal of the first embodiment of the device that a kind of data that the present invention is provided quickly are received and dispatched Figure.The game paddle is provided with the first transceiver module and the second transceiver module, the device 20 of the quick transceiving data of game paddle Including:Build module 21, sending module 22 and correction verification module 23.Module 21 is built, for being applied for the game paddle builds Main thread and transmitting-receiving by-pass journey;Sending module 22, for when the main thread needs to send data, making the transmitting-receiving by-pass journey The data are transmitted by the mutual cooperation of first transceiver module and second transceiver module;Correction verification module 23, For when first transceiver module and second transceiver module receive data, the transmitting-receiving by-pass journey to be received to described first The data that hair module and second transceiver module are received are verified, and when the data check passes through, will be described Data is activation is to application main thread.
In embodiments of the present invention, when the main thread needs to send data, the transmitting-receiving by-pass journey is made by described The mutual cooperation of the first transceiver module and second transceiver module is transmitted the quick hair that the data can be realized to data Send, improve the transmitting efficiency of data, save the time, and safety check also is carried out to data after the completion of receiving and dispatching, reach number According to the effect do not lost.
Fig. 7 is referred to, Fig. 7 is the signal of the second embodiment of the device that a kind of data that the present invention is provided quickly are received and dispatched Figure, the module 21-23 and module 21-23 in first embodiment in this implementation method is identical, is no longer gone to live in the household of one's in-laws on getting married one by one herein State.Specifically, sending module 22 includes:Transmitting element 221, the first extraction unit 222, copy cell 223, the second extraction unit 224th, the first allocation unit 225, the 3rd extraction unit 226, the first judging unit 227, the second allocation unit the 228, the 3rd are distributed Unit 229, the 4th extraction unit 220, the second judging unit 2201, the 4th allocation unit 2202 and the 5th allocation unit 2203. Transmitting element 221, for when the application main thread needs to send data send, the application main thread to perform message to Presetting message list, and by the data copy to level cache;First extraction unit 222, for making the transmitting-receiving by-pass journey According to fifo algorithm, from the presetting message list extract message and by the level cache with the message extracted The corresponding data copy eliminates the execution message in L2 cache;Copy cell 223, for making the transmitting-receiving By-pass journey is according to the processing priority principle of the first transceiver module and the second transceiver module and idle principle successively by L2 cache In the data copy to being transmitted data in the first transceiver module or the second transceiver module;Second extraction unit 224, For extracting the first data from the L2 cache, data number mark is added in first data header;First distribution Unit 225, for first data distribution to be processed to the second transceiver module;3rd extraction unit 226, for from institute State and extract the second data in L2 cache, data number mark is added in second data header, wherein, in the described second number The data number mark added according to head is incremented by according to the data number mark of the first data;First judging unit 227, uses In judging whether second data and first data are identical datas;Second allocation unit 228, if for described Two data are identical with first data, then be assigned to the second transceiver module and processed;3rd allocation unit 229, for such as Second data are different with first data, then be assigned to the first transceiver module and processed;4th extraction unit 220, For extracting the 3rd data from the L2 cache, the data number added in the 3rd data header is identified according to second The data number mark of data is incremented by;Second judging unit 2201, for judging the 3rd data with the described first number Whether it is identical data according to second data;4th allocation unit 2202, for such as with first data and described One of them in two data is identical data, the transmitting-receiving that the 3rd data distribution is received and dispatched to same data Module is together received and dispatched;5th allocation unit 2203, for such as being received with the first transceiver module and the second hair neither together, is then waited Module is processed again in the free time.
Specifically, the copy cell 223 includes:First extracts subelement 2231, judgment sub-unit 2232, sends son list Unit 2233 and second extracts subelement 2234.First extracts subelement 2231, for extracting a data from the L2 cache, Data number mark is added in the head of a data, and using a data as due-in data;Judgment sub-unit 2232, for judging first transceiver module and the second transceiver module with the presence or absence of the free time;Transmission sub-unit 2233, for working as First transceiver module and the second transceiver module only exist the transceiver module of free time, by the due-in data is activation to sky Not busy transceiver module, transmitting-receiving process is carried out by idle transceiver module, or, when first transceiver module and the second transmitting-receiving mould When block is idle, by the due-in data is activation to the second transceiver module, transmitting-receiving process is carried out by second transceiver module;The Two extract subelement 2234, for completing the reception to a data when first transceiver module or the second transceiver module After treatment, next data are extracted from the L2 cache, and the data number of next data is identified according to institute The data number mark for stating data is incremented by, will described in once data as due-in data, and return and judge described first Transceiver module and the second transceiver module are with the presence or absence of idle step.
Specifically, the correction verification module 23 includes:Adding device 231, for the afterbody before transceiving data in data Add CRC.
In embodiments of the present invention, when the main thread needs to send data, the transmitting-receiving by-pass journey is made by described The mutual cooperation of the first transceiver module and second transceiver module is transmitted the quick hair that the data can be realized to data Send, improve the transmitting efficiency of data, save the time, and safety check also is carried out to data after the completion of receiving and dispatching, reach number According to the effect do not lost.
Fig. 8 is referred to, Fig. 8 is the schematic diagram of the game paddle that the present invention performs the method that data are quickly received and dispatched.Game hand Handle 30 includes:One or more processors 301 and memory 302, in Fig. 6 by taking a processor 301 as an example.
Processor 301 and memory 302 can be connected by bus or other modes, be connected with by bus in Fig. 8 As a example by.
Memory 302 can be used to store non-volatile software journey as a kind of non-volatile computer readable storage medium storing program for executing The method correspondence that sequence, non-volatile computer executable program and module, such as data in the embodiment of the present invention are quickly received and dispatched Programmed instruction/module (for example, building module 21, sending module 22 and correction verification module 23).Processor 301 is stored by running Non-volatile software program in the memory 302, instruction and module, thus the various function application of execute server and Data processing, that is, realize the method that above method embodiment data are quickly received and dispatched.
Memory 302 can include storing program area and storage data field, wherein, storing program area can store operation system Application program required for system, at least one function;Storage data field can store the use of the device quickly received and dispatched according to data Data for being created etc..Additionally, memory 302 can include high-speed random access memory, non-volatile depositing can also be included Reservoir, for example, at least one disk memory, flush memory device or other non-volatile solid state memory parts.In some implementations In example, memory 302 is optional including the memory remotely located relative to processor 301, and these remote memories can pass through The device that network connection to data are quickly received and dispatched.The example of above-mentioned network includes but is not limited to internet, intranet, local Net, mobile radio communication and combinations thereof.
One or more of modules are stored in the memory 302, when by one or more of processors During 301 execution, the method for performing the quick transmitting-receiving of data in above-mentioned any means embodiment, for example, in performing Fig. 2 described above Method and step 11 to step 13, method and step 121 in Fig. 3 to step 123, method and step 1231 in Fig. 4 to step Method and step 121 in 1234, Fig. 5 realizes the module 21-23 in Fig. 6 to step 1203.
The method that the executable embodiment of the present invention of the said goods is provided, possesses the corresponding functional module of execution method and has Beneficial effect.Not ins and outs of detailed description in the present embodiment, reference can be made to the method that the embodiment of the present invention is provided.
Embodiments of the present invention are the foregoing is only, the scope of the claims of the invention is not thereby limited, it is every using this Equivalent structure or equivalent flow conversion that description of the invention and accompanying drawing content are made, or directly or indirectly it is used in other correlations Technical field, is included within the scope of the present invention.

Claims (10)

1. the method for the quick transceiving data of a kind of game paddle, it is characterised in that the game paddle is provided with the first transmitting-receiving mould Block and the second transceiver module, methods described include:
For the game paddle builds application main thread and transmitting-receiving by-pass journey;
When the application main thread needs to send data, make the transmitting-receiving by-pass journey by first transceiver module and described The mutual cooperation of the second transceiver module is transmitted the data;
When first transceiver module and second transceiver module receive data, make the transmitting-receiving by-pass journey to described first The data that transceiver module and second transceiver module are received are verified, and when the data check passes through, by institute State data is activation to application main thread.
2. method according to claim 1, it is characterised in that
The processing priority of first transceiver module is preferential less than the treatment of second transceiver module;
It is described when the main thread needs to send data, make the transmitting-receiving by-pass journey by first transceiver module and described The mutual cooperation of the second transceiver module is transmitted the data to be included:
When the application main thread needs to send data, the application main thread is sent execution message and arranged to presetting message Table, and by the data copy to level cache;
Make the transmitting-receiving by-pass journey according to fifo algorithm, extract message from the presetting message list and delay the one-level The data copy corresponding with message that is extracting that be depositing eliminates the execution message in L2 cache;
Make the transmitting-receiving by-pass journey according to the processing priority principle and idle principle of the first transceiver module and the second transceiver module Data will be transmitted in the data copy in L2 cache to the first transceiver module or the second transceiver module successively.
3. method according to claim 2, it is characterised in that described to make the by-pass journey according to the first transceiver module and The processing priority principle of two transceiver modules and idle principle are successively by the data copy in L2 cache to the first transmitting-receiving Being transmitted data in module or the second transceiver module includes:
A data are extracted from the L2 cache, data number mark is added in the head of a data, and will be described One data are used as due-in data;
Judge first transceiver module and the second transceiver module with the presence or absence of the free time;
When first transceiver module and the second transceiver module only exist the transceiver module of free time, the due-in data are sent out The transceiver module of free time is delivered to, transmitting-receiving process is carried out by idle transceiver module, or, when first transceiver module and second When transceiver module is idle, the due-in data is activation to the second transceiver module is received and dispatched by second transceiver module Treatment;
After first transceiver module or the second transceiver module complete the reception processing to a data, from described two Next data are extracted in level caching, and the data number of next data is identified according to the data number mark of the data Knowledge is incremented by, will the data once as due-in data, and return and judge that first transceiver module and second is received and dispatched Module is with the presence or absence of idle step.
4. method according to claim 2, it is characterised in that when the main thread needs to send data, make the receipts Hair by-pass journey is transmitted the data and also wraps by the mutual cooperation of first transceiver module and second transceiver module Include:
The first data are extracted from the L2 cache, data number mark is added in first data header;
First data distribution is processed to the second transceiver module;
The second data are extracted from the L2 cache, data number mark is added in second data header, wherein, in institute The data number mark for stating the addition of the second data header is incremented by according to the data number mark of the first data;
Judge whether second data and first data are identical datas;
If identical, it is assigned to the second transceiver module and is processed;
Such as difference, then it is assigned to the first transceiver module and is processed;
The 3rd data are extracted from the L2 cache, the data number added in the 3rd data header is identified according to second The data number mark of data is incremented by;
Judge whether the 3rd data are identical datas with first data and second data;
Such as with first data and second data in one of them be identical data, the 3rd data distribution is arrived The transceiver module that same data are received and dispatched together is received and dispatched;
Such as processed again in idle with the first transceiver module and the second transmitting-receiving module neither together, is then waited.
5. method according to claim 1, it is characterised in that it is described when first transceiver module with second transmitting-receiving When module receives data, the data that the transmitting-receiving by-pass journey is received to first transceiver module and second transceiver module Carrying out verification includes:
Afterbody in data before transceiving data adds CRC.
6. the device of the quick transceiving data of a kind of game paddle, it is characterised in that the game paddle is provided with the first transmitting-receiving mould Block and the second transceiver module, including:
Module is built, for building application main thread and transmitting-receiving by-pass journey for the game paddle;
Sending module, for when the main thread needs to send data, making the transmitting-receiving by-pass journey be received and dispatched by described first The mutual cooperation of module and second transceiver module is transmitted the data;
Correction verification module, for when first transceiver module and second transceiver module receive data, making the transmitting-receiving secondary Thread is verified to the data that first transceiver module and second transceiver module are received, and in the data school Test by when, by the data is activation to application main thread.
7. device according to claim 6, it is characterised in that the processing priority of first transceiver module is less than described The treatment of the second transceiver module is preferential, and the sending module includes:
Transmitting element, for when the application main thread needs to send data, sending the application main thread and performing message Give presetting message list, and by the data copy to level cache;
First extraction unit, for making the transmitting-receiving by-pass journey according to fifo algorithm, extracts from the presetting message list Message and by the data copy corresponding with the message extracted in the level cache to L2 cache, eliminates institute State execution message;
Copy cell, it is former according to the processing priority of the first transceiver module and the second transceiver module for making the transmitting-receiving by-pass journey To then enter in the data copy in L2 cache to the first transceiver module or the second transceiver module successively with idle principle Row sends data.
8. device according to claim 7, it is characterised in that the copy cell includes:
First extracts subelement, for extracting a data from the L2 cache, data is added in the head of a data Number-mark, and using a data as due-in data;
Judgment sub-unit, for judging first transceiver module and the second transceiver module with the presence or absence of the free time;
Transmission sub-unit, for only existing the transceiver module of free time when first transceiver module and the second transceiver module, By the due-in data is activation to idle transceiver module, transmitting-receiving process is carried out by idle transceiver module, or, when described the When one transceiver module and idle the second transceiver module, by the due-in data is activation to the second transceiver module, by described second Transceiver module carries out transmitting-receiving process;
Second extracts subelement, for completing to connect a data when first transceiver module or the second transceiver module After receipts treatment, extract next data from the L2 cache, and next data data number mark according to The data number mark of the data is incremented by, will described in once data as due-in data, and return and judge described the One transceiver module and the second transceiver module are with the presence or absence of idle step.
9. device according to claim 7, it is characterised in that the sending module includes:
Second extraction unit, for extracting the first data from the L2 cache, data is added in first data header Number-mark;
First allocation unit, for first data distribution to be processed to the second transceiver module;
3rd extraction unit, for extracting the second data from the L2 cache, data is added in second data header Number-mark, wherein, the data number mark added in second data header is identified according to the data number of the first data It is incremented by;
First judging unit, for judging whether second data and first data are identical datas;
Second allocation unit, if identical with first data for second data, is assigned to the second transceiver module Processed;
3rd allocation unit, it is different with first data for the second data as described, then it is assigned to the first transceiver module and enters Row treatment;
4th extraction unit, for extracting the 3rd data from the L2 cache, in the number that the 3rd data header is added It is incremented by according to the data number mark of the second data according to number-mark;
Second judging unit, for judging whether the 3rd data are identical numbers with first data and second data According to;
4th allocation unit, for such as with first data and second data in one of them be identical data, will The transceiver module that 3rd data distribution is received and dispatched to same data is together received and dispatched;
5th allocation unit, for being such as in the free time with the first transceiver module and the second transmitting-receiving module neither together, is then waited Processed again.
10. device according to claim 6, it is characterised in that the correction verification module also includes:
Adding device, CRC is added for the afterbody in data before transceiving data.
CN201611075314.3A 2016-11-29 2016-11-29 Method and device for rapidly receiving and transmitting data Active CN106730823B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611075314.3A CN106730823B (en) 2016-11-29 2016-11-29 Method and device for rapidly receiving and transmitting data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611075314.3A CN106730823B (en) 2016-11-29 2016-11-29 Method and device for rapidly receiving and transmitting data

Publications (2)

Publication Number Publication Date
CN106730823A true CN106730823A (en) 2017-05-31
CN106730823B CN106730823B (en) 2020-07-10

Family

ID=58898740

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611075314.3A Active CN106730823B (en) 2016-11-29 2016-11-29 Method and device for rapidly receiving and transmitting data

Country Status (1)

Country Link
CN (1) CN106730823B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113114507A (en) * 2021-04-15 2021-07-13 泉州文学士信息科技有限公司 Data identification device system for transmission of sensor equipment of Internet of things

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1984397A (en) * 2006-04-12 2007-06-20 华为技术有限公司 Method for reversing distributed base-station connected high-speed interface
US20130125135A1 (en) * 2011-11-07 2013-05-16 International Business Machines Corporation Intranode data communications in a parallel computer
CN103346869A (en) * 2013-06-19 2013-10-09 华为技术有限公司 Data receiving method and device
CN104410897A (en) * 2014-12-11 2015-03-11 深圳市九洲电器有限公司 Data storage method and device
CN104883335A (en) * 2014-02-27 2015-09-02 王磊 Full-hardware TCP protocol stack realizing method
US20150257302A1 (en) * 2014-03-06 2015-09-10 Dell Products, Lp System and Method for Providing AC Jumper Management and Identifying AC Jumper Topology
CN105120467A (en) * 2015-09-07 2015-12-02 重庆邮电大学 Dynamic distributed antenna deployment method for enhancing network capacity and coverage
CN105391883A (en) * 2015-12-09 2016-03-09 深圳市智慧猫软件技术有限公司 Method and system for enabling mobile phone App to add peripheral devices
CN105528306A (en) * 2014-09-28 2016-04-27 宇龙计算机通信科技(深圳)有限公司 Data read-write method for dual-system terminal, and dual-system terminal

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1984397A (en) * 2006-04-12 2007-06-20 华为技术有限公司 Method for reversing distributed base-station connected high-speed interface
US20130125135A1 (en) * 2011-11-07 2013-05-16 International Business Machines Corporation Intranode data communications in a parallel computer
CN103346869A (en) * 2013-06-19 2013-10-09 华为技术有限公司 Data receiving method and device
CN104883335A (en) * 2014-02-27 2015-09-02 王磊 Full-hardware TCP protocol stack realizing method
US20150257302A1 (en) * 2014-03-06 2015-09-10 Dell Products, Lp System and Method for Providing AC Jumper Management and Identifying AC Jumper Topology
CN105528306A (en) * 2014-09-28 2016-04-27 宇龙计算机通信科技(深圳)有限公司 Data read-write method for dual-system terminal, and dual-system terminal
CN104410897A (en) * 2014-12-11 2015-03-11 深圳市九洲电器有限公司 Data storage method and device
CN105120467A (en) * 2015-09-07 2015-12-02 重庆邮电大学 Dynamic distributed antenna deployment method for enhancing network capacity and coverage
CN105391883A (en) * 2015-12-09 2016-03-09 深圳市智慧猫软件技术有限公司 Method and system for enabling mobile phone App to add peripheral devices

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113114507A (en) * 2021-04-15 2021-07-13 泉州文学士信息科技有限公司 Data identification device system for transmission of sensor equipment of Internet of things

Also Published As

Publication number Publication date
CN106730823B (en) 2020-07-10

Similar Documents

Publication Publication Date Title
CN101539902B (en) DMA device for nodes in multi-computer system and communication method
CN108829613A (en) Date storage method and storage equipment
WO2016127552A1 (en) Direct memory access (dma) controller and data transmission method
CN106775434A (en) A kind of implementation method of NVMe networkings storage, terminal, server and system
CN105893271A (en) User apparatuses, modem chip and method of allocating buffer
TW201112679A (en) Device identifier selection
JPS6218949B2 (en)
CN103631534B (en) Data storage system and managing method thereof
CN107153511A (en) Memory node, mixing memory controller and the method for controlling mixing memory group
CN108959117A (en) H2D write operation accelerated method, device, computer equipment and storage medium
CN107135279A (en) It is a kind of to handle the method and apparatus that request is set up in long connection
CN104699584A (en) PCIE non-transparent bridge performance testing method
CN104317716B (en) Data transmission method and distributed node equipment between distributed node
CN104158757A (en) GPS (Global Positioning System) data loading and processing method and system
CN107704310A (en) A kind of method, apparatus and equipment for realizing container cluster management
CN103399832B (en) Out of order return data between bus return sequence method
CN104683486B (en) Method, apparatus, the distributed system of synchronization message are handled in distributed system
CN104809077B (en) The method of system on chip and management buffer
CN106730823A (en) The method and device that a kind of data are quickly received and dispatched
CN116225992A (en) NVMe verification platform and method supporting virtualized simulation equipment
CN111324567A (en) Method for realizing serial port communication and single chip microcomputer system
CN105357305B (en) File sending method and device, file receiving method and device and terminal equipment
CN103312614A (en) Multicast message processing method, line card and communication device
CN110659043B (en) Firmware upgrading method, device, equipment and storage medium
CN104375967B (en) A kind of flow control methods, equipment and system applied to PCI E

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 518000 101 (buildings 1-7), building 7, No. 58 Guangtian Road, Luotian community, Yanluo street, Bao'an District, Shenzhen City, Guangdong Province

Patentee after: Shenzhen Jingchuang Technology Electronics Co.,Ltd.

Address before: Part of 2-5, 7 and 6 / F, building C14, Fuyuan Industrial City, 598 Zhoushi Road, Xixiang street, Bao'an District, Shenzhen City, Guangdong Province

Patentee before: SHENZHEN KING CHUANG TECH & ELECTRONIC Co.,Ltd.

CP03 Change of name, title or address