CN109656169A - Multi-scheduling table switching method and device, computer equipment and storage medium - Google Patents
Multi-scheduling table switching method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN109656169A CN109656169A CN201811562790.7A CN201811562790A CN109656169A CN 109656169 A CN109656169 A CN 109656169A CN 201811562790 A CN201811562790 A CN 201811562790A CN 109656169 A CN109656169 A CN 109656169A
- Authority
- CN
- China
- Prior art keywords
- message
- list
- dispatch
- content
- total
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 230000005540 biological transmission Effects 0.000 claims abstract description 10
- 238000004590 computer program Methods 0.000 claims description 21
- 230000006870 function Effects 0.000 abstract description 10
- 238000010586 diagram Methods 0.000 description 14
- 238000012545 processing Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 238000004422 calculation algorithm Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000002775 capsule Substances 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/042—Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
- G05B19/0423—Input/output
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/25—Pc structure of the system
- G05B2219/25257—Microcontroller
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention relates to a method, a device, a computer device and a storage medium for switching multiple scheduling tables, wherein the method comprises the steps of judging whether a request for switching the scheduling tables exists; if yes, switching a scheduling table according to the request, and clearing the sending time slot counts of all messages; judging whether the sending time slot counts of all the messages are zero or not; if yes, judging whether the current scheduling table is empty or not; if not, acquiring the content of the message list from the message general list according to the current scheduling table; updating the transmission time slot count of the corresponding message according to the content of the message list; analyzing the content of the message list to obtain a message to be sent and a sending channel; and sending the message to be sent according to the sending channel. The invention improves the flexibility of the system, associates the scheduling table with the message general list, calls the specific message list content in the message general list, carries out message sending tasks, expands the functions of the system, supports the switching of a plurality of scheduling tables, and adapts to the increasingly complex ECU control requirements in the market.
Description
Technical field
The present invention relates to dispatch list switching methods, more specifically refer to multiple dispatch table switching method, device, computer
Equipment and storage medium.
Background technique
LIN (local interconnect network, Local Interconnect Network) bus is based on UART (universal asynchronous receipts
Send out the monobus serial communication of interface) agreement, the main purpose of LIN bus is to provide for a kind of automobile-used bus of low cost,
General LIN bus network is to constitute the single physical channel LIN by a host node and multiple interconnect from node, as shown in Figure 1, section
Serial communication is transmitted by single line between point, LIN bus network includes a main task node and multiple from task node,
Main task node is mainly responsible for the message determined in bus, is responsible for responding the request of host node from task, host node is by looking into
The content for asking dispatch list determines the sequence of transmission message, and formation is single main mostly from structure, without arbitration.
LIN bus communication currently on the market is executed by scheduling table algorithm, which, which is substantially, is directed to
The communication modes of one master and multiple slaves are realized in the single channel LIN, but due to ECU (electronic control unit, Electronic Control
Unit) controller circuitry is increasingly complicated huge, and many ECU controllers itself are integrated with the physical channel multichannel LIN, traditional single-pass
Individual scheduling table algorithm of road has been unable to satisfy performance requirement, and single scheduling table algorithm flexibility is short of, can not be according to the external world
Situation adjusts, can not lifting system flexibility.
Therefore, it is necessary to design a kind of new method, realizes and support the switching of multiple dispatch lists, while scalability
The flexibility of system is improved, adapts in the market the increasingly ECU demand for control of complexity, and adjust according to extraneous situation.
Summary of the invention
It is an object of the invention to overcome the deficiencies of existing technologies, multiple dispatch table switching method, device, computer are provided
Equipment and storage medium.
To achieve the above object, the invention adopts the following technical scheme: multiple dispatch table switching method, comprising:
Judge whether there is the request of switching dispatch list;
If so, switching dispatch list according to the request, and the sending time slots for removing all messages count;
Whether the sending time slots counting for judging all messages is zero;
If so, judging whether current dispatch list is empty;
If it is not, obtaining message list content out of message total list according to current dispatch list;
The update counted according to the sending time slots that message list content carries out corresponding message;
Message list content is analyzed, to obtain the message that need to be sent and sendaisle;
The message for needing to send is sent according to sendaisle.
Its further technical solution are as follows: before the request for judging whether there is switching dispatch list, further includes:
The data structure of the total list of message and the content of dispatch list are set.
Its further technical solution are as follows: the data structure of the total list of message includes sequence of the message in the total list of message
Number, message send the physical channel LIN, the flow direction of message, the byte length that message is sent and stored messages address.
Its further technical solution are as follows: the content of the dispatch list includes the information and message with the total list association of message
Sending time slots.
Its further technical solution are as follows: after whether the sending time slots counting for judging all messages is zero, comprising:
If it is not, then subtracting one to the sending time slots counting of all messages;
Whether the sending time slots counting for judging all messages after subtracting is zero;
If it is not, then receiving transmitted message;
If so, adding one to the index point in dispatch list;
Whether the current scheduling table index pointer of judgement is directed toward the end of dispatch list;
If so, index point in dispatch list is reset, so that index point is directed toward gauge outfit in dispatch list;
Described judge whether current dispatch list is empty if it is not, then returning.
Its further technical solution are as follows: the current dispatch list of the basis obtains in message list out of message total list
Hold, comprising:
Obtain the position that index point is directed toward in current scheduling table;
Obtain the information with the total list association of message of the position;
According to the information association with the total list association of message to the serial number in the total list of message, to obtain the report for needing to send
Serial number of the text in the total list of message;
The message sent as needed obtains in the total list of message in the serial number of the total list of message about the serial number
Data, to obtain message list content.
The present invention also provides multiple dispatch table switching devices, comprising:
Judging unit is requested, for judging whether there is the request of switching dispatch list;
Switch unit is used for if so, switching dispatch list according to the request, and remove the sending time slots meter of all messages
Number;
Whether first counts judging unit, be zero for judging that the sending time slots of all messages count;
Dispatch list judging unit, for if so, judging whether current dispatch list is empty;
Contents acquiring unit, for if it is not, obtaining message list content out of message total list according to current dispatch list;
Updating unit, the update that the sending time slots for carrying out message according to message list content count;
Analytical unit, for analyzing message list content, to obtain the message that need to be sent and sendaisle;
Transmission unit, for sending the message for needing to send according to sendaisle.
Its further technical solution are as follows: described device further include:
Setting unit, for the data structure of the total list of message and the content of dispatch list to be arranged.
The present invention also provides a kind of computer equipment, the computer equipment includes memory and processor, described to deposit
Computer program is stored on reservoir, the processor realizes above-mentioned method when executing the computer program.
The present invention also provides a kind of storage medium, the storage medium is stored with computer program, the computer journey
Sequence can realize above-mentioned method when being executed by processor.
Compared with the prior art, the invention has the advantages that: the present invention according to whether being scheduled table by cutting
It changes, the selection and adjustment of suitable dispatch list is carried out according to extraneous circumstance, to improve the flexibility of system, by dispatch list and message
Total list is associated, and during executing dispatch list, is transferred specific message list content in the total list of message, is carried out message
Transmission task, the function of expansion system support multiple dispatch lists to switch, and adapt in the market the increasingly ECU demand for control of complexity.
The invention will be further described in the following with reference to the drawings and specific embodiments.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description
Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field
For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the structural schematic diagram of the LIN bus of the prior art;
Fig. 2 is the application scenarios schematic diagram of multiple dispatch table switching method provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of multiple dispatch table switching method provided in an embodiment of the present invention;
Fig. 4 is the sub-process schematic diagram of multiple dispatch table switching method provided in an embodiment of the present invention;
Fig. 5 is the total list data structure schematic diagram of message provided in an embodiment of the present invention;
Fig. 6 is the schematic diagram of dispatch list content provided in an embodiment of the present invention;
Fig. 7 is the schematic block diagram of multiple dispatch table switching device provided in an embodiment of the present invention;
Fig. 8 is the schematic block diagram of the contents acquiring unit of multiple dispatch table switching device provided in an embodiment of the present invention;
Fig. 9 is the schematic block diagram of computer equipment provided in an embodiment of the present invention;
Figure 10 is the structural schematic diagram of multichannel LIN bus provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction
Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded
Body, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment
And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on
Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is
Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
Fig. 2 and Fig. 3 are please referred to, Fig. 2 is that the application scenarios of multiple dispatch table switching method provided in an embodiment of the present invention show
It is intended to.Fig. 3 is the schematic flow chart of multiple dispatch table switching method provided in an embodiment of the present invention.
The multiple dispatch table switching method can be used in server, carried out data interaction with terminal etc., sent out by terminal
The request for whether needing to switch over dispatch list is played, in the alignment processing for being scheduled table according to the request currently initiated, and in advance
The relationship of dispatch list, the total list of message and message list content is first set, response is rapidly scheduled according to incidence relation,
The switching and adjustment that dispatch list can be made according to the actual situation, also improve the flexibility of system while scalability, fit
It should increasingly complicated ECU demand for control in the market.
The multiple dispatch table switching method is suitable for multichannel LIN bus, and as shown in Figure 10, multichannel LIN bus refers to
Be that a master controller provides multiple physical channels LIN, carry may be selected in the LIN node of different baud rates or different levels
In suitable physical channel, master controller manages the different nodes in multiple channels by internal algorithm to be communicated, node
Only allow to access the node for being in same channels.Host node is the sequence for determining to send message by the content of query scheduling table,
The mono- dispatch list of traditional LIN only allows using fixed dispatch list, suitable dispatch list can not be selected to use according to extraneous circumstance,
Communication sequence, access cycle and the access content that can change node using multiple dispatch table, greatly improve system flexibility.
Fig. 3 is the flow diagram of multiple dispatch table switching method provided in an embodiment of the present invention.As shown in figure 3, the party
Method includes the following steps S110 to S250.
The content of S110, the data structure that the total list of message is set and dispatch list.
The data structure of the total list of above-mentioned message refer to enumerating storage location where message, flow direction, send it is logical
There is certain associated relationship between the table and dispatch list in the table of the contents such as road.As shown in figure 5, the total list of the message
Data structure include message in the serial number of the total list of message, the physical channel LIN that message is sent, the flow direction of message, message hair
The address of the byte length and stored messages that send.Index is serial number of the message in the total list of message, and dispatch list can pass through
Index is associated with the total list of message and obtains the message for needing to send;Channel be determine message which physical channel LIN into
Row is sent;Req Type is the flow direction for determining message data;Length is the byte length sent;Content is stored messages
The address of data.
The content of above-mentioned dispatch list refers to the sending time slots with the information of the total list association of message and message, i.e. capsule
The message list information and sending time slots for needing to send have been included, and message list information is present in the total list of message, in turn
It needs for dispatch list and the total list of message to be associated, to reach the function of scheduling, as shown in fig. 6, Msg Index is association
The information for needing the message sent is obtained to the total list of message;Frame-Slot determines the sending time slots of message.
S120, the request for judging whether there is switching dispatch list.
In the present embodiment, which is to be triggered by terminal according to extraneous circumstance, so that whole process has root
Suitable dispatch list, the flexibility of lifting system are selected according to extraneous circumstance.
In one embodiment, it before executing step S120, also to follow the steps below:
LIN bus is initialized.
If it is not, then entering the step S140.
S130, if so, according to the request switch dispatch list, and remove all messages sending time slots count.
If occurring needing switching request, the dispatch list that can be specified according to specific request is switched to corresponding dispatch list,
For example each dispatch list can be identified, the mark has been included in request, and corresponding dispatch list is switched to by mark, or
Person can be switched to corresponding dispatch list according to the category by the classification of extraneous circumstance.For example send pure digi-tal message, then certainly
It is dynamic to be switched to dispatch list S etc..
After switching dispatch list, then needs to be purged the sending time slots counting of all messages, avoid to next execution
Dispatch list transferred message transmission impact, to guarantee the normal work function of whole system.
Whether S140, the sending time slots counting for judging all messages are zero.
In the present embodiment, dispatch list content only can be just executed when the sending time slots technology of all messages is zero.
S150, subtract one if it is not, then counting to the sending time slots of all messages.
If after removing the counting, however it remains count, then carry out subtracting one processing to counting.
Whether S160, the sending time slots counting for judging the message after subtracting are zero;
S170, if it is not, then receiving transmitted message.
If the counting after subtracting one is still not zero, the message for showing that the needs are sent has been sent, and terminal receives the hair
The message sent.
S180, if so, adding one to the index point in dispatch list;
To index point plus first is that fingering row dispatch list next task.
Whether the current scheduling table index pointer of S190, judgement is directed toward the end of dispatch list;
S200, if so, index point in dispatch list is reset so that index point is directed toward gauge outfit in dispatch list, and return
Return the step S210;
If it is not, then entering the step S210.
If next task has been not present, i.e., all tasks in the dispatch list are to be finished, associated need
The message to be sent is sent, then returns the position of dispatch list most initial, repeats the execution of dispatch list.
If the sending time slots of S210, all messages are counted as zero, judge whether current dispatch list is empty.
If there is no any tasks in the dispatch list needed to be implemented, that is, the message without needing to send, then enter
End step can also send notification information to terminal, inform that terminal switches dispatch list, thus the flexibility of lifting system.
S220, if it is not, obtaining message list content out of message total list according to current dispatch list.
When executing dispatch list, the message for needing to send and its relevant information are mainly obtained;The message list content
Including position, flow direction, the physical channel LIN that message is sent and the byte long for needing to send for needing the message sent to be stored
Degree.The above-mentioned physical channel LIN refers to an actual LIN network channel.
In one embodiment, as shown in figure 4, above-mentioned step S220 may include step S221~S224.
S221, the position that index point is directed toward in current scheduling table is obtained;
S222, the information with the total list association of message for obtaining the position;
S223, according to the information association of the total list association of message to the serial number in the total list of message, to obtain needing sending out
Serial number of the message sent in the total list of message;
S224, the message sent as needed obtain in the total list of message in the serial number of the total list of message about the sequence
Number data, to obtain message list content.
It can be needed using the incidence relation of dispatch list and the total list of message in conjunction with the data structure of the total list of message
All data for the message to be sent, to form message list content.
The update that S230, the sending time slots that message is carried out according to message list content count.
It in the present embodiment, is specifically according in the message list content of index point pointed location for the update of counting
Documented message sending time slots replace current count value.
S240, message list content is analyzed, to obtain the message that need to be sent and sendaisle;
S250, the message for needing to send is sent according to sendaisle.
Determine which physical channel LIN to send the message of needs transmission according to the channel in message list content,
After transmission, terminal can receive the message, carry out corresponding processing.
If so, into end step.
Above-mentioned multiple dispatch table switching method, by according to whether table switching is scheduled, according to extraneous circumstance
The selection and adjustment of suitable dispatch list are carried out, to improve the flexibility of system, dispatch list and the total list of message are associated,
During executing dispatch list, specific message list content in the total list of message is transferred, message is carried out and sends task, extension system
The function of system supports multiple dispatch lists to switch, and adapts in the market the increasingly ECU demand for control of complexity.
Fig. 7 is a kind of schematic block diagram of multiple dispatch table switching device 300 provided in an embodiment of the present invention.Such as Fig. 7 institute
Show, corresponds to the above multiple dispatch table switching method, the present invention also provides a kind of multiple dispatch table switching devices 300.This is multiple
Dispatch list switching device 300 includes the unit for executing above-mentioned multiple dispatch table switching method, which can be configured in
In server.
Specifically, referring to Fig. 7, the multiple dispatch table switching device 300 includes:
Judging unit 302 is requested, for judging whether there is the request of switching dispatch list;
Switch unit 303 is used for if so, according to request switching dispatch list, and when removing the transmission of all messages
Gap counts;
Whether first counts judging unit 304, be zero for judging that the sending time slots of all messages count;
Dispatch list judging unit 311, for if so, judging whether current dispatch list is empty;
Contents acquiring unit 312, for if it is not, being obtained in message list out of message total list according to current dispatch list
Hold;
Updating unit 313, the update that the sending time slots for carrying out message according to message list content count;
Analytical unit 314, for analyzing message list content, to obtain the message that need to be sent and send logical
Road;
Transmission unit 315, for sending the message for needing to send according to sendaisle.
In one embodiment, described device further include:
Setting unit 301, for the data structure of the total list of message and the content of dispatch list to be arranged.
In addition, above-mentioned device further include:
Processing unit 305 is counted, for if it is not, then subtracting one to the sending time slots counting of all messages;
Whether second counts judging unit 306, be zero for judging that the sending time slots of all messages after subtracting count;
Receiving unit 307, for if it is not, then receiving transmitted message;
Pointer processing unit 308, for if so, adding one to the index point in dispatch list;
Pointer position judging unit 309, for judging whether current scheduling table index pointer is directed toward the end of dispatch list;
Reset cell 310, for if so, index point in dispatch list is reset, so that index point refers in dispatch list
To gauge outfit.
In one embodiment, as shown in figure 8, above-mentioned contents acquiring unit 312 includes:
Position acquisition subelement 3121, for obtaining the position that index point is directed toward in current scheduling table;
Related information obtains subelement 3122, for obtaining the information with the total list association of message of the position;
Serial number obtain subelement 3123, for according to in the information association to the total list of message of the total list association of message
Serial number, to obtain the message for needing to send in the serial number of the total list of message;
Data acquisition subelement 3124, the message for sending as needed are obtained in the serial number of the total list of message in message
Data in total list about the serial number, to obtain message list content.
It should be noted that it is apparent to those skilled in the art that, above-mentioned multiple dispatch table switching dress
The specific implementation process of 300 and each unit is set, it can be with reference to the corresponding description in preceding method embodiment, for convenience of description
With it is succinct, details are not described herein.
Above-mentioned multiple dispatch table switching device 300 can be implemented as a kind of form of computer program, the computer program
It can be run in computer equipment as shown in Figure 9.
Referring to Fig. 9, Fig. 9 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.The computer
Equipment 500 can be terminal, be also possible to server, wherein terminal can be smart phone, tablet computer, laptop,
Desktop computer, personal digital assistant and wearable device etc. have the electronic equipment of communication function.Server can be independent
Server is also possible to the server cluster of multiple server compositions.
Refering to Fig. 9, which includes processor 502, memory and the net connected by system bus 501
Network interface 505, wherein memory may include non-volatile memory medium 503 and built-in storage 504.
The non-volatile memory medium 503 can storage program area 5031 and computer program 5032.The computer program
5032 include program instruction, which is performed, and processor 502 may make to execute a kind of multiple dispatch table switching side
Method.
The processor 502 is for providing calculating and control ability, to support the operation of entire computer equipment 500.
The built-in storage 504 provides environment for the operation of the computer program 5032 in non-volatile memory medium 503, should
When computer program 5032 is executed by processor 502, processor 502 may make to execute a kind of multiple dispatch table switching method.
The network interface 505 is used to carry out network communication with other equipment.It will be understood by those skilled in the art that in Fig. 9
The structure shown, only the block diagram of part-structure relevant to application scheme, does not constitute and is applied to application scheme
The restriction of computer equipment 500 thereon, specific computer equipment 500 may include more more or fewer than as shown in the figure
Component perhaps combines certain components or with different component layouts.
Wherein, the processor 502 is for running computer program 5032 stored in memory, to realize following step
It is rapid:
Judge whether there is the request of switching dispatch list;
If so, switching dispatch list according to the request, and the sending time slots for removing all messages count;
Whether the sending time slots counting for judging all messages is zero;
If so, judging whether current dispatch list is empty;
If it is not, obtaining message list content out of message total list according to current dispatch list;
The update counted according to the sending time slots that message list content carries out corresponding message;
Message list content is analyzed, to obtain the message that need to be sent and sendaisle;
The message for needing to send is sent according to sendaisle.
In one embodiment, before the request step that processor 502 judges whether there is switching dispatch list described in the realization, also
Realize following steps:
The data structure of the total list of message and the content of dispatch list are set.
Wherein, the data structure of the total list of the message includes the LIN that message is sent in the serial number of the total list of message, message
Physical channel, the flow direction of message, message send byte length and stored messages address.
The content of the dispatch list includes the sending time slots with the information of the total list association of message and message.
In one embodiment, processor 502 is realizing whether the sending time slots counting for judging all messages is zero step
After rapid, following steps are also realized:
If it is not, then subtracting one to the sending time slots counting of all messages;
Whether the sending time slots counting for judging all messages after subtracting is zero;
If it is not, then receiving transmitted message;
If so, adding one to the index point in dispatch list;
Whether the current scheduling table index pointer of judgement is directed toward the end of dispatch list;
If so, index point in dispatch list is reset, so that index point is directed toward gauge outfit in dispatch list;
Described judge whether current dispatch list is empty if it is not, then returning.
In one embodiment, processor 502 obtains report in the current dispatch list of the realization basis out of message total list
When literary list content step, it is implemented as follows step:
Obtain the position that index point is directed toward in current scheduling table;
Obtain the information with the total list association of message of the position;
According to the information association with the total list association of message to the serial number in the total list of message, to obtain the report for needing to send
Serial number of the text in the total list of message;
The message sent as needed obtains in the total list of message in the serial number of the total list of message about the serial number
Data, to obtain message list content.
It should be appreciated that in the embodiment of the present application, processor 502 can be central processing unit (Central
Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital
Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit,
ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic
Device, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor or
Person's processor is also possible to any conventional processor etc..
Those of ordinary skill in the art will appreciate that be realize above-described embodiment method in all or part of the process,
It is that relevant hardware can be instructed to complete by computer program.The computer program includes program instruction, computer journey
Sequence can be stored in a storage medium, which is computer readable storage medium.The program instruction is by the department of computer science
At least one processor in system executes, to realize the process step of the embodiment of the above method.
Therefore, the present invention also provides a kind of storage mediums.The storage medium can be computer readable storage medium.This is deposited
Storage media is stored with computer program, and processor is made to execute following steps when wherein the computer program is executed by processor:
Judge whether there is the request of switching dispatch list;
If so, switching dispatch list according to the request, and the sending time slots for removing all messages count;
Whether the sending time slots counting for judging all messages is zero;
If so, judging whether current dispatch list is empty;
If it is not, obtaining message list content out of message total list according to current dispatch list;
The update counted according to the sending time slots that message list content carries out corresponding message;
Message list content is analyzed, to obtain the message that need to be sent and sendaisle;
The message for needing to send is sent according to sendaisle.
In one embodiment, the processor realizes described judge whether there is and switches tune in the execution computer program
It spends before the request step of table, also realization following steps:
The data structure of the total list of message and the content of dispatch list are set.
Wherein, the data structure of the total list of message includes the LIN physics that message is sent in the serial number of the total list of message, message
Channel, the flow direction of message, message send byte length and stored messages address.
The content of the dispatch list includes the sending time slots with the information of the total list association of message and message.
In one embodiment, the processor realizes the hair for judging all messages executing the computer program
After sending slot count whether to be zero step, also realization following steps:
If it is not, then subtracting one to the sending time slots counting of all messages;
Whether the sending time slots counting for judging all messages after subtracting is zero;
If it is not, then receiving transmitted message;
If so, adding one to the index point in dispatch list;
Whether the current scheduling table index pointer of judgement is directed toward the end of dispatch list;
If so, index point in dispatch list is reset, so that index point is directed toward gauge outfit in dispatch list;
Described judge whether current dispatch list is empty if it is not, then returning.
In one embodiment, the processor realizes the current dispatch list of the basis executing the computer program
When obtaining message list content step out of message total list, it is implemented as follows step:
Obtain the position that index point is directed toward in current scheduling table;
Obtain the information with the total list association of message of the position;
According to the information association with the total list association of message to the serial number in the total list of message, to obtain the report for needing to send
Serial number of the text in the total list of message;
The message sent as needed obtains in the total list of message in the serial number of the total list of message about the serial number
Data, to obtain message list content.
The storage medium can be USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), magnetic disk
Or the various computer readable storage mediums that can store program code such as CD.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware
With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This
A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially
Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not
It is considered as beyond the scope of this invention.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it
Its mode is realized.For example, the apparatus embodiments described above are merely exemplary.For example, the division of each unit, only
Only a kind of logical function partition, there may be another division manner in actual implementation.Such as multiple units or components can be tied
Another system is closed or is desirably integrated into, or some features can be ignored or not executed.
The steps in the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.This hair
Unit in bright embodiment device can be combined, divided and deleted according to actual needs.In addition, in each implementation of the present invention
Each functional unit in example can integrate in one processing unit, is also possible to each unit and physically exists alone, can also be with
It is that two or more units are integrated in one unit.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product,
It can store in one storage medium.Based on this understanding, technical solution of the present invention is substantially in other words to existing skill
The all or part of part or the technical solution that art contributes can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, terminal or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace
It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right
It is required that protection scope subject to.
Claims (10)
1. multiple dispatch table switching method characterized by comprising
Judge whether there is the request of switching dispatch list;
If so, switching dispatch list according to the request, and the sending time slots for removing all messages count;
Whether the sending time slots counting for judging all messages is zero;
If so, judging whether current dispatch list is empty;
If it is not, obtaining message list content out of message total list according to current dispatch list;
The update counted according to the sending time slots that message list content carries out corresponding message;
Message list content is analyzed, to obtain the message that need to be sent and sendaisle;
The message for needing to send is sent according to sendaisle.
2. multiple dispatch table switching method according to claim 1, which is characterized in that described to judge whether there is switching scheduling
Before the request of table, further includes:
The data structure of the total list of message and the content of dispatch list are set.
3. multiple dispatch table switching method according to claim 2, which is characterized in that the data knot of the total list of message
Structure includes the byte that message is sent in the serial number of the total list of message, the physical channel LIN that message is sent, the flow direction of message, message
The address of length and stored messages.
4. multiple dispatch table switching method according to claim 2, which is characterized in that the content of the dispatch list include with
The information of the total list association of message and the sending time slots of message.
5. multiple dispatch table switching method according to any one of claims 1 to 4, which is characterized in that the judgement is all
After whether the sending time slots counting of message is zero, comprising:
If it is not, then subtracting one to the sending time slots counting of all messages;
Whether the sending time slots counting for judging all messages after subtracting is zero;
If it is not, then receiving transmitted message;
If so, adding one to the index point in dispatch list;
Whether the current scheduling table index pointer of judgement is directed toward the end of dispatch list;
If so, index point in dispatch list is reset, so that index point is directed toward gauge outfit in dispatch list;
Described judge whether current dispatch list is empty if it is not, then returning.
6. multiple dispatch table switching method according to claim 5, which is characterized in that the current dispatch list of the basis from
Message list content is obtained in the total list of message, comprising:
Obtain the position that index point is directed toward in current scheduling table;
Obtain the information with the total list association of message of the position;
According to the information association with the total list association of message to the serial number in the total list of message, to obtain that the message sent is needed to exist
The serial number of the total list of message;
The message sent as needed obtains the data in the total list of message about the serial number in the serial number of the total list of message,
To obtain message list content.
7. multiple dispatch table switching device characterized by comprising
Judging unit is requested, for judging whether there is the request of switching dispatch list;
Switch unit is used for if so, switching dispatch list according to the request, and the sending time slots for removing all messages count;
Whether first counts judging unit, be zero for judging that the sending time slots of all messages count;
Dispatch list judging unit, for if so, judging whether current dispatch list is empty;
Contents acquiring unit, for if it is not, obtaining message list content out of message total list according to current dispatch list;
Updating unit, the update that the sending time slots for carrying out message according to message list content count;
Analytical unit, for analyzing message list content, to obtain the message that need to be sent and sendaisle;
Transmission unit, for sending the message for needing to send according to sendaisle.
8. multiple dispatch table switching device according to claim 7, which is characterized in that described device further include:
Setting unit, for the data structure of the total list of message and the content of dispatch list to be arranged.
9. a kind of computer equipment, which is characterized in that the computer equipment includes memory and processor, on the memory
It is stored with computer program, the processor is realized as described in any one of claims 1 to 6 when executing the computer program
Method.
10. a kind of storage medium, which is characterized in that the storage medium is stored with computer program, the computer program quilt
Processor can be realized when executing such as method described in any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811562790.7A CN109656169B (en) | 2018-12-20 | 2018-12-20 | Multi-scheduling table switching method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811562790.7A CN109656169B (en) | 2018-12-20 | 2018-12-20 | Multi-scheduling table switching method and device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109656169A true CN109656169A (en) | 2019-04-19 |
CN109656169B CN109656169B (en) | 2021-08-27 |
Family
ID=66115903
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811562790.7A Active CN109656169B (en) | 2018-12-20 | 2018-12-20 | Multi-scheduling table switching method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109656169B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114760161A (en) * | 2021-11-19 | 2022-07-15 | 广州汽车集团股份有限公司 | LIN bus scheduling method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102750149A (en) * | 2012-06-13 | 2012-10-24 | 普华基础软件股份有限公司 | Realization method and system of dispatch list |
CN105303452A (en) * | 2015-08-21 | 2016-02-03 | 国电南瑞科技股份有限公司 | Power-grid regulation and control real-time data distributed processing method and system |
CN105634983A (en) * | 2014-10-30 | 2016-06-01 | 中兴通讯股份有限公司 | Queue dispatching method and device |
CN108282415A (en) * | 2017-12-29 | 2018-07-13 | 北京华为数字技术有限公司 | A kind of dispatching method and equipment |
CN108989243A (en) * | 2018-08-20 | 2018-12-11 | 清华大学 | A kind of real-time ethernet dispatching method of transmitting real-time data |
-
2018
- 2018-12-20 CN CN201811562790.7A patent/CN109656169B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102750149A (en) * | 2012-06-13 | 2012-10-24 | 普华基础软件股份有限公司 | Realization method and system of dispatch list |
CN105634983A (en) * | 2014-10-30 | 2016-06-01 | 中兴通讯股份有限公司 | Queue dispatching method and device |
CN105303452A (en) * | 2015-08-21 | 2016-02-03 | 国电南瑞科技股份有限公司 | Power-grid regulation and control real-time data distributed processing method and system |
CN108282415A (en) * | 2017-12-29 | 2018-07-13 | 北京华为数字技术有限公司 | A kind of dispatching method and equipment |
CN108989243A (en) * | 2018-08-20 | 2018-12-11 | 清华大学 | A kind of real-time ethernet dispatching method of transmitting real-time data |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114760161A (en) * | 2021-11-19 | 2022-07-15 | 广州汽车集团股份有限公司 | LIN bus scheduling method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109656169B (en) | 2021-08-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108776934B (en) | Distributed data calculation method and device, computer equipment and readable storage medium | |
CN107846295B (en) | Microservice configuration device and method | |
CN111124277B (en) | Deep learning data set caching method, system, terminal and storage medium | |
CN109840142B (en) | Thread control method and device based on cloud monitoring, electronic equipment and storage medium | |
CN109104336A (en) | Service request processing method, device, computer equipment and storage medium | |
CN110674053A (en) | SSD data storage node management method and device, computer equipment and storage medium | |
CN109213792A (en) | Method, server-side, client, device and the readable storage medium storing program for executing of data processing | |
CN107678835A (en) | A kind of data transmission method and system | |
CN108021492B (en) | Alarm merging method and equipment | |
CN107872494A (en) | A kind of information push method and device | |
CN103827842A (en) | Writing message to controller memory space | |
CN106649600B (en) | A kind of method, apparatus and system of migrated file permission | |
CN104765701B (en) | Data access method and equipment | |
CN109840141B (en) | Thread control method and device based on cloud monitoring, electronic equipment and storage medium | |
EP3534266B1 (en) | Method, apparatus and system for prefetching data | |
CN110119304A (en) | A kind of interruption processing method, device and server | |
CN109379305A (en) | A kind of data distributing method, device, server and storage medium | |
US20190043457A1 (en) | Apparatus and methods for generating dynamic trace data on a gpu | |
CN109542627A (en) | Node switching method, device, supervisor, node device and distributed system | |
CN113190427A (en) | Caton monitoring method and device, electronic equipment and storage medium | |
CN112347143A (en) | Multi-data stream processing method, device, terminal and storage medium | |
CN109375961A (en) | Application program launching optimization method, device, computer equipment and storage medium | |
CN116414534A (en) | Task scheduling method, device, integrated circuit, network equipment and storage medium | |
CN117332881B (en) | Distributed training method and electronic equipment | |
CN109656169A (en) | Multi-scheduling table switching method and device, computer 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 |