CN112925568B - Data transmission method and control device between modules - Google Patents

Data transmission method and control device between modules Download PDF

Info

Publication number
CN112925568B
CN112925568B CN202110329356.XA CN202110329356A CN112925568B CN 112925568 B CN112925568 B CN 112925568B CN 202110329356 A CN202110329356 A CN 202110329356A CN 112925568 B CN112925568 B CN 112925568B
Authority
CN
China
Prior art keywords
module
data
parameter
storage area
modules
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110329356.XA
Other languages
Chinese (zh)
Other versions
CN112925568A (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.)
Hangzhou DPtech Information Technology Co Ltd
Original Assignee
Hangzhou DPtech Information Technology 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 Hangzhou DPtech Information Technology Co Ltd filed Critical Hangzhou DPtech Information Technology Co Ltd
Priority to CN202110329356.XA priority Critical patent/CN112925568B/en
Publication of CN112925568A publication Critical patent/CN112925568A/en
Application granted granted Critical
Publication of CN112925568B publication Critical patent/CN112925568B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/34Addressing or accessing the instruction operand or the result ; Formation of operand address; Addressing modes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30098Register arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides an inter-module data transmission method, a control module and a functional module. The method comprises the following steps: receiving a reading request sent by a first module, wherein the reading request comprises an identifier of a second module; searching the parameter data of the second module from a parameter storage area according to the identifier; and returning the parameter data to the first module so that the first module reads the content data of the second module from the data storage area according to the parameter data, the coupling relation between the functional modules is broken, the upper and lower modules are not directly connected, and a method that the functional modules are connected with the control module is adopted, so that the system design requirement which cannot be realized by the pipeline technology can be met, the independent debugging of each functional module is facilitated, and the modification times and the modification content are reduced as far as possible when an external interface controls, modifies or adds codes to the bottom layer.

Description

Data transmission method and control device between modules
Technical Field
The present disclosure relates to the field of computer technologies and communication technologies, and in particular, to an inter-module data transmission method, a control device, and a functional module.
Background
In the development of software or hardware, pipeline technology is generally adopted. The pipeline technology is a method for data flow direction between modules, and the method can improve the system frequency, reduce the transmission time delay between registers and ensure that the system runs under a higher clock frequency.
However, this method is only suitable for data flow direction is unidirectional, and the output of the previous step is the input of the next step. In this case, the system debugging needs to be completed step by step, and the efficiency is low. Moreover, if the system needs to have all the functional modules capable of interacting, the design is difficult to realize.
In addition, in the process of logic development, data and parameters are always transmitted among the functional modules, and once new requirements occur or existing functions need to be modified, modification of interfaces is always unavoidable. In this case, developers of different functional modules need extra time to perform communication negotiation to determine the interactive interfaces of the modules, and modifying existing codes or adding new functional modules need to consider the functions and interfaces of the modules at the upper and lower levels.
The above information disclosed in this background section is only for enhancement of understanding of the background of the disclosure and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In view of this, the present invention provides an inter-module data transmission method, a control module and a function module, which at least improve the efficiency of data interaction to a certain extent.
Additional features and advantages of the invention will be set forth in the detailed description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
According to an aspect of the embodiments of the present invention, there is provided a method for transmitting data between modules, which is applied to a control module, the method including: receiving a reading request sent by a first module, wherein the reading request comprises an identifier of a second module; searching the parameter data of the second module from a parameter storage area according to the identifier; and returning the parameter data to the first module so that the first module reads the content data of the second module from a data storage area according to the parameter data.
In some exemplary embodiments of the invention, based on the foregoing, the method further comprises: receiving parameter data and content data sent by each module, wherein the parameter data comprises data for describing the storage position of the content data; storing the content data into a data storage area according to the recorded corresponding relation between the identification of each module and the data storage area and the parameter data; and storing the parameter data into a parameter storage area according to the recorded corresponding relation between the identifier of each module and the parameter storage area.
In some exemplary embodiments of the present invention, based on the foregoing scheme, the storing the content data into a data storage area according to the recorded correspondence between the identifier of each module and the data storage area and the parameter data includes: determining a distribution area of the content data in the data storage area according to the recorded corresponding relation between the identification of each module and the data storage area; determining a sub-region of the content data from the distribution region according to the parameter data; storing the content data to the sub-region.
In some exemplary embodiments of the present invention, based on the foregoing solution, finding the parameter data of the second module from the parameter storage area according to the identifier includes: and determining the parameter data of the second module corresponding to the identification from the recorded corresponding relation between the identification of each module and the parameter storage area.
In some exemplary embodiments of the invention, based on the foregoing, the method further comprises: and allocating the data storage area and the parameter storage area according to the data amount of each module, and recording the corresponding relation between the identifier of each module and the data storage area and the corresponding relation between the identifier of each module and the parameter storage area.
In some exemplary embodiments of the present invention, based on the foregoing solution, if a message reading request sent by a plurality of first modules is received, the method further includes: according to the priority sequence of the plurality of first modules, parameter data of the respective second module are searched from a parameter storage area according to the identification of the second module included in the message reading request sent by each first module, and the parameter data are returned to each first module, so that each first module reads the content data of the second module from a data storage area according to the parameter data; wherein the priority ranking is determined according to the data volume proportion of each module.
According to another aspect of the embodiments of the present invention, there is provided an inter-module data transmission method, applied to a first module, the method including: sending a reading request to a control module, wherein the reading request comprises an identifier of a second module; receiving the parameter data of the second module searched by the control module from a parameter storage area according to the identification; and reading the content data of the second module from a data storage area according to the parameter data.
In some exemplary embodiments of the invention, based on the foregoing, the method further comprises: comparing the received zone bit of the parameter data with the previously received zone bit of the parameter data of the second module; and if the flag bits are different, reading the content data of the second module from a data storage area according to the parameter data.
In some exemplary embodiments of the invention, based on the foregoing, the method further comprises: acquiring the content data; generating parameter data corresponding to the content data according to the content data and the corresponding relation between the recorded identification of each module and a data storage area; and sending the content data and the parameter data to the control module for storage.
According to still another aspect of the embodiments of the present invention, there is provided a control module for data transmission between modules, the control module including: a request receiving unit configured to receive a read request sent by a first module, where the read request includes an identifier of a second module; the data searching unit is configured to search the parameter data of the second module from the parameter storage area according to the identifier; and the data return unit is configured to return the parameter data to the first module so that the first module reads the content data of the second module from the data storage area according to the parameter data.
In some exemplary embodiments of the invention, based on the foregoing, the control module further includes: the data receiving unit is configured to receive parameter data and content data sent by each module, wherein the parameter data comprises data used for describing the storage position, size and length of the content data; the data storage unit is configured to store the content data into a data storage area according to the recorded corresponding relation between the identification of each module and the data storage area and the parameter data; and the parameter storage unit is configured to store the parameter data in the parameter storage area according to the recorded corresponding relation between the identifier of each module and the parameter storage area.
In some exemplary embodiments of the present invention, based on the foregoing scheme, the data storage unit includes: the first determining subunit is configured to determine, according to the recorded correspondence between the identifier of each module and the data storage area, an allocation area of the content data in the data storage area; a second determining subunit configured to determine a sub-area of the content data from the distribution area in accordance with the parameter data; a data storage subunit configured to store the content data to the sub-region.
In some exemplary embodiments of the present invention, based on the foregoing scheme, the data searching unit is configured to: and determining the parameter data of the second module corresponding to the identification from the recorded corresponding relation between the identification of each module and the parameter storage area.
In some exemplary embodiments of the present invention, based on the foregoing, the control module further includes: and the area allocation unit is configured to allocate the data storage area and the parameter storage area according to the data amount of each module, and record the corresponding relation between the identifier of each module and the data storage area and the corresponding relation between the identifier of each module and the parameter storage area.
In some exemplary embodiments of the present invention, based on the foregoing solution, if the request receiving unit is configured to receive message reading requests sent by multiple first modules, the data searching unit is configured to sequentially search, according to the priority ranking of the multiple first modules, parameter data of a respective second module from a parameter storage area according to an identifier of the second module included in the message reading request sent by each first module, and the data returning unit is configured to return the parameter data to each first module, so that each first module reads content data of the second module from a data storage area according to the parameter data; wherein the priority ranking is determined according to the data volume proportion of each module.
According to still another aspect of the embodiments of the present invention, there is provided a function module for data transmission between modules, the function module including: a request sending unit configured to send a read request to the control module, where the read request includes an identifier of the second module; the parameter receiving unit is configured to receive the parameter data of the second module searched by the control module from the parameter storage area according to the identifier; and the data reading unit is configured to read the content data of the second module from the data storage area according to the parameter data.
In some exemplary embodiments of the present invention, based on the foregoing solution, the function module further includes: the parameter comparison unit is configured to compare the zone bit of the received parameter data with the zone bit of the parameter data of the second module received last time; and the data reading unit is configured to read the content data of the second module from the data storage area according to the parameter data if the flag bits are different.
In some exemplary embodiments of the present invention, based on the foregoing solution, the function module further includes: a data acquisition unit configured to acquire the content data; the parameter generating unit is configured to generate parameter data corresponding to the content data according to the content data and the corresponding relationship between the recorded identification of each module and the data storage area; and the sending storage unit is configured to send the content data and the parameter data to the control module for storage.
According to a further aspect of embodiments of the present invention, there is provided a computer readable storage medium having a computer program stored thereon, wherein the program when executed by a processor implements the method steps as described above.
According to still another aspect of the embodiments of the present invention, there is provided an electronic device, including: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method steps as described above.
In the embodiment of the present invention, by receiving a read request sent by a first module, the read request includes an identifier of a second module; searching the parameter data of the second module from a parameter storage area according to the identifier; and returning the parameter data to the first module so that the first module reads the content data of the second module from the data storage area according to the parameter data, the coupling relation between the functional modules is broken, the upper and lower modules are not directly connected, but the method that the functional modules are connected with the control module is adopted, the system design requirement which cannot be realized by the pipeline technology can be met, and the independent debugging of each functional module is facilitated, and the modification times and the content modification are reduced as far as possible when an external interface (such as a pc) controls, modifies or adds codes to the bottom layer.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 is a block diagram illustrating an inter-module data transmission system in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method of inter-module data transfer in accordance with one illustrative embodiment;
FIG. 3 is a flow chart illustrating a method of inter-module data transfer in accordance with another exemplary embodiment;
FIG. 4 is a schematic diagram of a data storage area shown in accordance with an exemplary embodiment;
FIG. 5 is a flowchart illustrating a method of inter-module data transfer in accordance with yet another exemplary embodiment;
FIG. 6 is a flowchart illustrating a method of inter-module data transfer in accordance with yet another exemplary embodiment;
FIG. 7 is a block diagram illustrating a control module for data transfer between modules in accordance with an exemplary embodiment;
FIG. 8 is a block diagram illustrating the structure of a functional module for data transfer between modules in accordance with an exemplary embodiment;
fig. 9 is a schematic diagram of a structure of an electronic device shown in accordance with an exemplary embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the invention.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the disclosed concept. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It is to be understood by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present disclosure and, therefore, are not intended to limit the scope of the present disclosure.
In the existing data processing system, the situation that parameter data and content data are transmitted between functional modules at the same time is often encountered. The embodiment of the invention disassembles the data link and the parameter link on the basis of the prior pipeline technology, and each functional module can complete one-to-one or even one-to-many content data and parameter data transmission only by one group of interfaces under the condition.
Fig. 1 is a block diagram illustrating an inter-module data transmission system according to an exemplary embodiment, which may include a first module 110, a second module 120, a control module 130, a parameter storage area 190, and a data storage area 150, as shown in fig. 1.
The first module 110 and the second module 120 may be functional modules in a data flow process, and there is data interaction between them. The number of the first module 110 and the second module 120 may be plural. In the embodiment of the present invention, the first module is a data reading module with respect to the second module, the second module is a data storage module with respect to the first module, and the first module needs to read data of the second module, for example, the first module 110 may be a computing module, the second module 120 may be a querying module, and the first module 110 performs computation on data queried by the second module 120.
In the embodiment of the present invention, the first module 110 may also be used as a data storage module of another module, and the second module 120 may also be used as a data reading module of another module. The second module using the first module 110 as a data storage module may be plural, and the second module 120 as a data reading module may also be plural.
In this embodiment of the present invention, the parameter storage area 190 may be a URAM, the data storage area 150 may be a DDR or HBM, and the parameter storage area 190 and the data storage area 150 are respectively divided into corresponding storage areas for the first module 110 and the second module 120.
The control module 130 is connected to the parameter storage area 190 and the data storage area 150 through interfaces, and stores the parameter data and the content data sent by the second module into the parameter storage area and the data storage area, respectively, so that the parameter data is found according to the identifier of the second module in the read request sent by the first module, and the parameter data is returned to the first module, so that the first module reads the content data according to the parameter data.
The following describes the inter-module data transmission method in the embodiment of the present invention in detail.
Fig. 2 is a flowchart of a data transmission method between modules according to an exemplary embodiment, in the embodiment of the present invention, a control module is used as an execution main body for description, it should be noted that the control module may be any device with a computing function, for example, a server or a terminal, and as shown in fig. 2, the method may include, but is not limited to, the following processes:
in S210, a read request sent by the first module is received, where the read request includes an identifier of the second module.
In the embodiment of the invention, the first module is a data reading module relative to the second module. The fetch request may also include an identification of the first module.
In S220, the parameter data of the second module is searched from the parameter storage area according to the identifier.
In the embodiment of the present invention, the data storage area and the parameter storage area may be allocated according to the data amount of each module, and the corresponding relationship between the identifier of each module and the data storage area and the corresponding relationship between the identifier of each module and the parameter storage area may be recorded.
In the embodiment of the present invention, the data volume ratio of each module may be generated according to the data volume of the content data and the parameter data generated by each module in the history. For example, there are n function modules in the system, where the percentage of the data amount of the function module 1 to the total data amount of all the function modules is 20%, and the data amount ratio of the function module 1 is 0.2.
After the data volume ratio of each module is determined, distributing a data storage area and a parameter storage area according to the data volume ratio, and recording the corresponding relation between the identifier of each module and the data storage area and the corresponding relation between the identifier of each module and the parameter storage area. For example, if the data storage area and the parameter storage area are divided into 100 equal parts and the percentage of the function modules is 0.2, 1 to 20 parts of the data storage area and the village parameter storage area are allocated to the function module 1, and the correspondence relationship is recorded.
After receiving the identifier in the read request, according to the recorded correspondence between the identifier of each module and the parameter storage area, the parameter data of the second module corresponding to the identifier may be determined according to the identifier of the second module in the read request.
In S230, the parameter data is returned to the first module, so that the first module reads the content data of the second module from the data storage area according to the parameter data.
In the embodiment of the invention, a reading request sent by a first module is received, wherein the reading request comprises an identifier of a second module; searching the parameter data of the second module from a parameter storage area according to the identifier; and returning the parameter data to the first module so that the first module reads the content data of the second module from the data storage area according to the parameter data, the coupling relation between the functional modules is broken, the upper and lower modules are not directly connected, but the method that the functional modules are connected with the control module is adopted, the system design requirement which cannot be realized by the pipeline technology can be met, and the independent debugging of each functional module is facilitated, and the modification times and the content modification are reduced as far as possible when an external interface (such as a pc) controls, modifies or adds codes to the bottom layer.
In the embodiment, the data transmission in a non-single flow direction is realized, the system design requirement which cannot be realized by a pipeline technology is met, each functional module has a function of independently controlling data reading, and data is called through the interface connected with the control module, so that the condition that the number of the first modules is modified and a group of interfaces is required to be added for transmission is avoided. Secondly, the interfaces of all the functional modules are completely the same, so that the functional modules are prevented from being modified greatly, only the functional modules need to be added if the functional modules need to be added, other parts basically do not need to be modified, and the positioning is convenient when a problem occurs.
In the aspect of message interaction, the embodiment of the invention adopts a full interconnection design for information interaction between the control module and other functional modules, and supports message sharing among any functional modules. By the design, the use overhead of register group resources (parameter storage areas and data storage areas) is increased, message reading of each functional module is facilitated, and conflicts caused by simultaneous reading of unified states by a plurality of modules are avoided. Moreover, the main function of the control module is to complete the resource scheduling of the function module for the parameter data and the content data. The control module does not need to know the functions of other functional modules and does not need to pay attention to the functions of the other functional modules, so that the modification of the control module during the modification of the functional modules is reduced.
In the embodiment of the present invention, the control module may not directly search for the content data according to the parameter data because the processing of the parameter data and the processing of the content data belong to different links. For the two links, the FPGA can be realized, and if a computer program can apply for content data or parameter data from the bottom layer according to an agreed format, the computer program can be changed into a functional module to be integrated into the whole system, so that the interaction between the upper computer and the bottom layer can be finished better.
The embodiment of the invention ensures that the new functional module does not need to carry out extra work under the condition of determining the interface, and only needs to acquire necessary information when being integrated into the whole system without excessive communication and negotiation.
In the embodiment of the present invention, it is not limited to returning the parameter data to the first module, and the first module reads the content data of the second module from the data storage area according to the parameter data, for example, the control module may also directly read the content data of the second module from the data storage area according to the parameter data. At this time, the control function of the control module is added, and when the function module changes, the control module needs to be modified, so that the situation that the number of the first modules needs to be modified and one more group of interfaces needs to be used for transmission cannot be avoided. Moreover, if a function needs to be added, not only the function module needs to be added, but also the control module needs to be modified correspondingly.
According to the embodiment of the invention, the control module not only relates to the data reading process, but also relates to the storage part of the data. Fig. 3 is a flow chart illustrating a method of inter-module data transmission according to another exemplary embodiment, which may include, but is not limited to, the following flows as shown in fig. 3:
in S310, parameter data and content data sent by each module are received, where the parameter data includes data describing a storage location of the content data.
It should be noted that, different from the distribution area of the content data of the module in the data storage area, which can be obtained from the correspondence relationship between the recorded identifier of the module and the data storage area, the storage location in the parameter data is used to describe a specific sub-area of the content data in the distribution area.
For example, fig. 4 is a schematic diagram of a data storage area shown according to an exemplary embodiment, as shown in fig. 4, where an area a of the data storage area is an allocation area corresponding to the function module 1, and content data described in the parameter data is stored in an a3 sub-area of a, where content data of the function module 1 at other times is recorded in other sub-areas of a.
Differences of the read request, the parameter data, and the content data are described below with reference to table 1.
Number of fields Bit position Function(s) Description of the preferred embodiment
1 32bits Read request This field will indicate to the control module the identity of the first module and the identity of the second module
2 32bits Parameter data This field will indicate the length of the content data stored in the data storage area
3~n 32bits*n Content data The field is the specific content of the write back information of each module, and each field is 32bits
TABLE 1
For example, read requests: 32' h 03030707: 0303 represents that the module is the function module 3, 0707 represents that the module inquires the parameter data of the function module 7.
It should be noted that the function module sends the write request to the control module when storing data, the number of fields and the bits of the write request are the same as those of the read request, for example, the meaning of 32' h 830303 is: the write message is applied on behalf of the functional module 3.
Parameter data: meaning of 32' h 8: it indicates that the length of the parameter data is 8 32bits, and the length indicated by this field does not contain a read request.
Content data: the functional module stores content data which needs to be output in the form of n 32 bits.
It should be noted that the parameter data may further include data describing the size and length of the content data and a flag bit.
In S320, the content data is stored in the data storage area according to the recorded correspondence between the identifier of each module and the data storage area and the parameter data.
In the embodiment of the present invention, an allocation area of the content data in the data storage area may be determined according to a correspondence between the recorded identifier of each module and the data storage area, and then a sub-area of the content data is determined from the allocation area according to the parameter data, and the content data is stored in the sub-area.
As shown in fig. 4, it may be determined that the content data of the function module 1 is stored in the a-region according to the correspondence relationship between the function module 1 and the data storage region, and further, according to the sub-region a3 of the content data determined in the parameter, the current content data may be stored in the sub-region a3 of the a-region.
In S330, the parameter data is stored in the parameter storage area according to the recorded correspondence between the identifier of each module and the parameter storage area.
For example, if the parameter storage area allocated to the function module 1 is a B area, the parameter data is directly stored in the B area after the content data is completely stored.
It should be noted that the allocation region of the parameter storage region does not need to divide each sub-region, but only has one piece of parameter data, and if the allocation region needs to store new parameter data, the new parameter data is directly used to overwrite the old parameter data.
In the embodiment of the invention, by storing the content data first and then storing the storage sequence of the parameter data, the content data can be ensured to be stored when the second module acquires the parameter data, and the condition that the read content data is incomplete or cannot be read due to incomplete or non-stored content data can be avoided.
According to the embodiment of the present invention, the control module may not only relate to the case of receiving a read request of only one first module, but also relate to the case of receiving the read of multiple first modules, and at this time, according to the priority ranking of the multiple first modules, the parameter data of the respective second module is searched from the parameter storage area according to the identifier of the second module included in the message read request sent by each first module, and the parameter data is returned to each first module, so that each first module reads the content data of the second module from the data storage area according to the parameter data. And after one first module finishes the return of the parameter data, the priority of the first module is reduced to the lowest level until all the first modules finish the round of patrol and then the originally set priority is recovered.
For example, the control module receives the read requests sent by the first modules 1 and 2 at the same time, and assuming that the priority of the first module 1 is higher than that of the first module 2, at this time, after the parameter data of the first module 1 is searched and returned to the first module 1, the parameter data of the first module 2 is searched and returned to the first module 2.
It should be noted that the order of priority of the functional modules may be determined according to the data amount of each functional module. If the data volume proportion of the function module 1 is higher than that of the function module 2, the priority of the function module 1 is higher than that of the function module 2.
Fig. 5 is a flowchart illustrating a method for transmitting data between modules according to still another exemplary embodiment, where an execution subject of the method is a function module, and for convenience of description, the first module and the second module in the foregoing embodiments are described as examples, where the execution subject of the method is specifically the first module, it should be noted that the function module may be any device with a computing function, such as a server or a terminal, as shown in fig. 5, and the method may include, but is not limited to, the following processes:
in S510, a read request is sent to the control module, where the read request includes an identifier of the second module.
In S520, the parameter data of the second module searched by the control module from the parameter storage area according to the identifier is received.
It should be noted that the parameter data may include a storage location for describing the content data and a flag bit, but the present invention is not limited thereto, and for example, the parameter data may also include data for describing the size and length of the content data.
In S530, the content data of the second module is read from the data storage area according to the parameter data.
In the embodiment of the invention, a reading request is sent to a control module, wherein the reading request comprises an identifier of a second module; receiving the parameter data of the second module searched by the control module from a parameter storage area according to the identifier; and reading the content data of the second module from a data storage area according to the parameter data. The coupling relation between the functional modules is broken, the upper and lower modules are not directly connected, but the functional modules are connected with the control module, so that the system design requirement which cannot be realized by a pipeline technology can be met, the independent debugging of each functional module is facilitated, and the modification times and the modification content are reduced as far as possible when an external interface (such as a pc) controls, modifies or adds codes to the bottom layer.
In the embodiment of the invention, the functional module can also relate to data storage besides reading data. The functional module obtains content data by processing source data, further generates parameter data corresponding to the content data according to the content data and the corresponding relation between the recorded identification of each module and a data storage area, and sends the content data and the parameter data to the control module for storage.
It should be noted that, the parameter data includes data for describing the storage location, size, length of the content data, and information of the flag bit, so that the functional module may generate the content data first, and then generate the parameter information according to the storage location (which may be preset by the functional module), size, length, and flag bit of the content data.
In the embodiment of the present invention, after each functional module receives the parameter data returned by the control module, it can also determine whether the content data corresponding to the parameter data has been stored or is the latest parameter data according to the parameter data. Specifically, the functional module may compare a flag bit of the received parameter data with a flag bit of the parameter data of the second module received last time, and if the flag bits are different, read the content data of the second module from the data storage area according to the parameter data. If the flag bits are the same, the parameter data are not updated, and the content data of the second module are read from the data storage area according to the parameter data when the flag bits of the parameter data are different from the flag bits of the parameter data of the second module received last time.
It is noted that the flag bit of the parameter data may be used to indicate version information of the content data. For example, if the flag bit of the parameter data received from the second module 1 this time is 2.2 and the flag bit of the parameter received from the second module last time is 2.1, it indicates that the parameter data is updated, that is, the content data is updated, and at this time, the content data can be read, and if the flag bit of the parameter received from the second module last time is also 2.2, it is necessary to wait for the flag bit of the parameter data received again to be not 2.2 before reading the content data.
Fig. 6 is a flowchart illustrating a method for transmitting data between modules according to still another exemplary embodiment, which is described by taking the first module and the second module in the foregoing embodiments as an example for convenience of description, and as shown in fig. 6, the method may include, but is not limited to, the following processes:
in S601, the second module generates content data and parameter data.
In S602, the second module completes writing of the content data and the parameter data.
In S603, the first module acquires parameter data.
In S604, the first module determines whether the parameter data is up to date.
If yes, executing S605, otherwise executing S606.
In S605, the content data is read.
In S606, execution returns to S603.
In the embodiment of the invention, the content data and the parameter data are stored through the parameter storage area and the data storage area, so that all the function modules can be called on the original interface, the condition that one more function module for reading one more group of content data or one more group of parameter data needs to be transmitted by one more group of interfaces does not exist, and the interfaces of the function modules are completely the same, so that only internal logic needs to be modified when a code is modified, and the problem positioning is convenient. If the function needs to be added, only the functional module needs to be added, and other parts basically do not need to be modified.
It should be clearly understood that the present disclosure describes how to make and use particular examples, but the principles of the present disclosure are not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.
The following are embodiments of the apparatus of the present invention that may be used to perform embodiments of the method of the present invention. In the following description of the system, the same parts as those of the foregoing method will not be described again.
Fig. 7 is a schematic structural diagram of a control module for data transmission between modules according to an exemplary embodiment, where the control module 700 includes: a request receiving unit 710, a data searching unit 720 and a data returning unit 730.
The request receiving unit 710 is configured to receive a read request sent by a first module, where the read request includes an identifier of a second module.
A data searching unit 720, configured to search the parameter data of the second module from the parameter storage area according to the identifier.
A data returning unit 730 configured to return the parameter data to the first module, so that the first module reads the content data of the second module from the data storage area according to the parameter data.
In the embodiment of the invention, a reading request sent by a first module is received, wherein the reading request comprises an identifier of a second module; searching the parameter data of the second module from a parameter storage area according to the identifier; and returning the parameter data to the first module so that the first module reads the content data of the second module from the data storage area according to the parameter data, the coupling relation between the functional modules is broken, the upper and lower modules are not directly connected, but the method that the functional modules are connected with the control module is adopted, the system design requirement which cannot be realized by the pipeline technology can be met, and the independent debugging of each functional module is facilitated, and the modification times and the content modification are reduced as far as possible when an external interface (such as a pc) controls, modifies or adds codes to the bottom layer.
Fig. 8 is a schematic structural diagram illustrating a functional module for data transmission between modules according to an exemplary embodiment, where the functional module 800 includes: a request sending unit 810, a parameter receiving unit 820 and a data reading unit 830.
The request sending unit 810 is configured to send a read request to the control module, where the read request includes an identifier of the second module.
Wherein, the parameter receiving unit 820 is configured to receive the parameter data of the second module searched by the control module from the parameter storage area according to the identifier.
Wherein the data reading unit 830 is configured to read the content data of the second module from the data storage area according to the parameter data.
In the embodiment of the invention, a reading request is sent to a control module, wherein the reading request comprises an identifier of a second module; receiving the parameter data of the second module searched by the control module from a parameter storage area according to the identifier; and reading the content data of the second module from a data storage area according to the parameter data. The coupling relation between the functional modules is broken, the upper and lower modules are not directly connected, but the method that the functional modules are connected with the control module is adopted, the system design requirement which cannot be realized by the pipeline technology can be met, the independent debugging of each functional module is facilitated, and the modification times and the modification content are reduced as far as possible when an external interface (such as a pc) controls, modifies or adds codes to the bottom layer.
Fig. 9 is a schematic structural diagram of an electronic device according to an exemplary embodiment. It should be noted that the electronic device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the application scope of the embodiments of the present application.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU)901 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM903, various programs and data necessary for the operation of the system 900 are also stored. The CPU 901, ROM 902, and RAM903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The above-described functions defined in the terminal of the present application are executed when the computer program is executed by the Central Processing Unit (CPU) 901.
It should be noted that the computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present application may be implemented by software or hardware. The modules described may also be provided within a processor, where the name of a module does not in some cases constitute a limitation on the module itself.
Exemplary embodiments of the present invention have been particularly shown and described above. It is to be understood that the invention is not limited to the precise construction, arrangements, or instrumentalities described herein; on the contrary, the invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (7)

1. An inter-module data transmission method, applied to a control device, the method comprising:
receiving a reading request sent by a first module, wherein the reading request comprises an identifier of a second module;
searching the parameter data of the second module from a parameter storage area according to the identifier;
returning the parameter data to the first module so that the first module reads the content data of the second module from a data storage area according to the parameter data;
if message reading requests sent by a plurality of first modules are received, according to the priority ranking of the plurality of first modules, parameter data of the respective second module are searched from a parameter storage area according to the identification of the second module included in the message reading request sent by each first module, and the parameter data are returned to each first module, so that each first module reads content data of the second module from a data storage area according to the parameter data, wherein the priority ranking is determined according to the data weight proportion of each module.
2. The method of inter-module data transmission according to claim 1, wherein said method further comprises:
receiving parameter data and content data sent by each module, wherein the parameter data comprises data for describing the storage position of the content data;
storing the content data into a data storage area according to the recorded corresponding relation between the identification of each module and the data storage area and the parameter data;
and storing the parameter data in a parameter storage area according to the recorded corresponding relation between the identification of each module and the parameter storage area.
3. The method for transmitting data between modules according to claim 2, wherein the storing the content data in a data storage area according to the recorded correspondence between the identifier of each module and the data storage area and the parameter data comprises:
determining a distribution area of the content data in the data storage area according to the recorded corresponding relation between the identification of each module and the data storage area;
determining a sub-region of the content data from the distribution region according to the parameter data;
storing the content data to the sub-region.
4. The method for data transmission between modules according to claim 2, wherein the step of searching the parameter data of the second module from the parameter storage area according to the identifier comprises:
and determining the parameter data of the second module corresponding to the identification from the recorded corresponding relation between the identification of each module and the parameter storage area.
5. The method of inter-module data transmission according to claim 2, wherein said method further comprises:
and distributing the data storage area and the parameter storage area according to the data volume proportion of each module, and recording the corresponding relation between the identifier of each module and the data storage area and the corresponding relation between the identifier of each module and the parameter storage area.
6. An apparatus for controlling data transmission between modules, the apparatus comprising:
a request receiving unit configured to receive a read request sent by a first module, where the read request includes an identifier of a second module;
the data searching unit is configured to search the parameter data of the second module from the parameter storage area according to the identifier;
a data returning unit, configured to return the parameter data to the first modules, so that the first modules read the content data of the second modules from the data storage areas according to the parameter data, and if message reading requests sent by the first modules are received, sequentially search the parameter data of the respective second module from the parameter storage areas according to the identifiers of the second modules included in the message reading requests sent by each first module according to the priority ranking of the first modules, and return the parameter data to each first module, so that each first module reads the content data of the second module from the data storage areas according to the parameter data, where the priority ranking is determined according to the data volume proportion of each module.
7. The control device according to claim 6, characterized in that the control device further comprises:
the data receiving unit is configured to receive parameter data and content data sent by each module, wherein the parameter data comprises data used for describing the storage position, size and length of the content data;
the data storage unit is configured to store the content data into a data storage area according to the recorded corresponding relation between the identification of each module and the data storage area and the parameter data;
and the parameter storage unit is configured to store the parameter data in the parameter storage area according to the recorded corresponding relation between the identifier of each module and the parameter storage area.
CN202110329356.XA 2021-03-28 2021-03-28 Data transmission method and control device between modules Active CN112925568B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110329356.XA CN112925568B (en) 2021-03-28 2021-03-28 Data transmission method and control device between modules

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110329356.XA CN112925568B (en) 2021-03-28 2021-03-28 Data transmission method and control device between modules

Publications (2)

Publication Number Publication Date
CN112925568A CN112925568A (en) 2021-06-08
CN112925568B true CN112925568B (en) 2022-07-26

Family

ID=76176289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110329356.XA Active CN112925568B (en) 2021-03-28 2021-03-28 Data transmission method and control device between modules

Country Status (1)

Country Link
CN (1) CN112925568B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102084332A (en) * 2008-04-06 2011-06-01 弗森-艾奥公司 Apparatus, system, and method for converting a storage request into an append data storage command
CN103475532A (en) * 2012-06-08 2013-12-25 腾讯科技(深圳)有限公司 Hardware detection method and system thereof
CN104834481A (en) * 2015-04-30 2015-08-12 中国电子科技集团公司第四十一研究所 Signal analysis system and signal analysis method for large-capacity rapid storage and playback
CN108153812A (en) * 2017-11-24 2018-06-12 广州高清视信数码科技股份有限公司 Method, apparatus, computer equipment and the storage medium of data communication
CN109165136A (en) * 2018-07-25 2019-01-08 平安科技(深圳)有限公司 Monitoring method, terminal device and the medium of terminal operating data
CN109669787A (en) * 2018-12-05 2019-04-23 恒生电子股份有限公司 Data transmission method and device, storage medium, electronic equipment
CN110704691A (en) * 2019-09-10 2020-01-17 苏州浪潮智能科技有限公司 Data management method and device, electronic equipment and storage medium
CN111796858A (en) * 2020-07-07 2020-10-20 金蝶软件(中国)有限公司 Method, system and related equipment for access detection of application programs in Kubernetes cluster
CN112040328A (en) * 2020-08-04 2020-12-04 北京字节跳动网络技术有限公司 Data interaction method and device and electronic equipment
CN112346390A (en) * 2020-11-24 2021-02-09 杭州迪普信息技术有限公司 Optical module control method, device, equipment and computer readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8732429B2 (en) * 2010-10-20 2014-05-20 International Business Machines Corporation Preserving a deleted data volume
US8880978B2 (en) * 2011-04-01 2014-11-04 Cleversafe, Inc. Utilizing a local area network memory and a dispersed storage network memory to access data
US9047211B2 (en) * 2013-03-15 2015-06-02 SanDisk Technologies, Inc. Managing data reliability
US9807058B2 (en) * 2015-07-02 2017-10-31 T-Mobile Usa, Inc. Monitoring wireless data consumption

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102084332A (en) * 2008-04-06 2011-06-01 弗森-艾奥公司 Apparatus, system, and method for converting a storage request into an append data storage command
CN103475532A (en) * 2012-06-08 2013-12-25 腾讯科技(深圳)有限公司 Hardware detection method and system thereof
CN104834481A (en) * 2015-04-30 2015-08-12 中国电子科技集团公司第四十一研究所 Signal analysis system and signal analysis method for large-capacity rapid storage and playback
CN108153812A (en) * 2017-11-24 2018-06-12 广州高清视信数码科技股份有限公司 Method, apparatus, computer equipment and the storage medium of data communication
CN109165136A (en) * 2018-07-25 2019-01-08 平安科技(深圳)有限公司 Monitoring method, terminal device and the medium of terminal operating data
CN109669787A (en) * 2018-12-05 2019-04-23 恒生电子股份有限公司 Data transmission method and device, storage medium, electronic equipment
CN110704691A (en) * 2019-09-10 2020-01-17 苏州浪潮智能科技有限公司 Data management method and device, electronic equipment and storage medium
CN111796858A (en) * 2020-07-07 2020-10-20 金蝶软件(中国)有限公司 Method, system and related equipment for access detection of application programs in Kubernetes cluster
CN112040328A (en) * 2020-08-04 2020-12-04 北京字节跳动网络技术有限公司 Data interaction method and device and electronic equipment
CN112346390A (en) * 2020-11-24 2021-02-09 杭州迪普信息技术有限公司 Optical module control method, device, equipment and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于WebService的风电集中监测与数据分析平台设计;刘晓光等;《发电与空调》;20151215;全文 *

Also Published As

Publication number Publication date
CN112925568A (en) 2021-06-08

Similar Documents

Publication Publication Date Title
CN109840429B (en) Intelligent contract deployment and calling method and device
CN109062563B (en) Method and device for generating page
CN109117252B (en) Method and system for task processing based on container and container cluster management system
CN112612523B (en) Embedded equipment driving system and method
EP3869434A1 (en) Blockchain-based data processing method and apparatus, device, and medium
WO2020215752A1 (en) Graph computing method and device
CN112740323B (en) Voice understanding method and device
CN110851285A (en) Resource multiplexing method, device and equipment based on GPU virtualization
CN111737564A (en) Information query method, device, equipment and medium
CN115827250A (en) Data storage method, device and equipment
US8060885B2 (en) Creating task queries for concrete resources using alias selection fields specifying formal resources and formal relationships
CN112148467A (en) Dynamic allocation of computing resources
CN112925568B (en) Data transmission method and control device between modules
CN111597035B (en) Simulation engine time propulsion method and system based on multithreading
CN111078789B (en) Data sharing method and device, storage medium and electronic equipment
CN113760499A (en) Method, device, computing equipment and medium for scheduling computing unit
US20140237480A1 (en) Method, processing modules and system for executing an executable code
CN109614383B (en) Data copying method and device, electronic equipment and storage medium
CN109614089A (en) Automatic generation method, device, equipment and the storage medium of data access code
CN114675954A (en) Task scheduling method and device
CN114398410A (en) Method and device for generating continuous numbers, server cluster and storage medium
CN114020319A (en) Interface calling method, device, server and computer readable storage medium
CN110543351B (en) Data processing method and computer device
CN113495723A (en) Method and device for calling functional component and storage medium
CN113760986A (en) Data query method, device, equipment and storage medium

Legal Events

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