Method for determining current data in a computing system

By using a non-transitive relationship of mark element sets and state variables in a multi-task computing system, the problem of determining the latest data is solved, the overflow state is avoided, and low-cost and efficient data latest judgment is achieved.

CN118689595APending Publication Date: 2024-09-24ROBERT BOSCH GMBH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410341211.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-23
Filing Date
2024-03-25
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

In a multi-task computing system, it is difficult to effectively determine which data is the latest, especially when using the timestamp of a transitive relationship, an arbitrarily long ascending or descending sequence may occur, leading to the problem of overflow status.

Method used

Use a collection of mark elements with non-transitive relationships, provide relative relationships at time points through state variable encoding data, avoid overflow status, and set separate or shared state variables for each provider, and use non-transitive relationships to determine the latest status of the data provider .

Benefits of technology

It effectively avoids the occurrence of overflow status, simplifies the process of determining the latest data, reduces processing complexity and cost, and is especially suitable for multi-task computing systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689595A
    Figure CN118689595A
Patent Text Reader

Abstract

The present invention relates to a method for determining current data in a computing system (C0, C1, C2) using a set of tagging elements, in which a plurality of providers (P1, P2) provide data, in which a non-transitive relationship is defined on the set, in which for each arbitrary first tagging element, the first tagging element and the second tagging element are associated with each other. At least one further second tagging element is present such that the first tagging element is associated with the second tagging element, but the second tagging element is not associated with the first tagging element; wherein a state variable is set for each provider (P1, P2), which state variable has a state value for each other provider, the state variable of the first provider being changed (110) if necessary in the event that one of the providers (P1, P2), referred to as the first provider, provides new data, and the state variable of the second provider being changed (110) if necessary. The first provider is configured such that it applies for each provider, referred to as a second provider, different from the first provider: a state value assigned to the second provider in a state variable of the first provider correlates with a state value assigned to the first provider in a state variable of the second provider. Furthermore, data provided by one of the providers (P1, P2), referred to as the third provider, is determined (125) as latest data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method or a computer-implemented method for determining current data in a computing system, as well as a computing unit, a computer system and a computer program for carrying out the method. Background Art

[0002] In a computer system or multitasking system, the following situation may occur: multiple computer tasks are executed in parallel and each provide new data or information in a time-unsynchronized manner. Another computer task running in parallel that processes data (where the latest data should be processed in each case) must then be able to determine which data is the latest. Summary of the invention

[0003] According to the invention, a method for determining current data in a computing system and a computing unit, a computer system and a computer program for carrying out the method are proposed having the features of the independent patent claims. Advantageous embodiments are the subject matter of the dependent claims and the following description.

[0004] According to the invention, in a method for determining current data in a computing system in which data is provided by a plurality of providers, a (finite) set of marking elements is used, wherein a non-transitive relationship is defined on the set, wherein a state variable is set for each provider, the state variable having an entry or a state value for each marking element. The relative relationship between the data provision times is encoded in the state variable. By using non-transitive relationships, the following overflow states can be avoided: These overflow conditions can occur when using transitive timestamp relationships that allow for arbitrarily long ascending or descending sequences. Therefore, it is not necessary to take any special measures to handle overflow conditions.

[0005] The method for determining current data in a computing system is a computer implemented method.

[0006] In general, a single or multiple state variables can be set. In the case of multiple state variables, a separate state variable from the multiple state variables can be set for each provider, which includes the following state value for each other provider, and the state value is assigned to the corresponding other provider. In the case of a single state variable, the single state variable is set for all providers, that is, the same state variable is set for each provider. Then, this single state variable includes the state value assigned to the provider for each provider. Multiple state values ​​can generally adopt an element from the tag element set, i.e., the tag element (as value).

[0007] The relation between two sets M and N (more precisely, a two-dimensional relation or a binary relation) can be formally defined as a subset R of the Cartesian product of the two sets, that is, defined as Where M×N={(a, b)|a∈M, b∈N}. In order to express how two elements behave with respect to the relationship, the following formula is used:

[0008] If for two elements a∈M, b∈N it holds that: (a, b) is contained in the subset R, i.e. if (a, b)∈R holds, then “a is associated with b”.

[0009] Otherwise, if applicable Then "a and b are not related".

[0010] Likewise, the notation "aRelb" is used, where the statement "a Rel b is true" means: "a is related to b", and the statement "a Rel b is false" means: "a is not related to b". This notation also represents one or more relationships between elements.

[0011] With reference to the above definition of relationship, it applies in this application that the two sets are equal, ie M = N. Here, a set of marking elements is used as set M, wherein the marking elements are used in principle to encode the temporal relationship between data provided by different providers or corresponding provision times.

[0012] For a relation used in this application it holds that the relation is non-transitive and that for each tag element x∈M there is at least one other tag element y∈M such that x Rel y is true and y Rel x is false. A relation is non-transitive if the statement (transitivity) "from x Rel y and y Rel z being true it follows that x Rel z is true" is false. Thus, for a relation used in this application there are at least three tag elements x, y, z∈M for which it holds that x Rely is true, y Rel z is true, and x Rel z is false (or z Rel x is true).

[0013] The set based on which relations satisfying these conditions can be defined must contain at least three elements A, B, C, where for example: relations A Rel C, B Rel A and C Rel B are true and all other relations between these elements are false. Preferably, the set has one more element than the data provider.

[0014] The state variables can be stored in a memory of a computing system so that, for example, a provider and / or a data processor can access them. In this case, the (storage) access to these state variables is performed in an atomic manner, in particular.

[0015] A computing system is generally understood to be a system having at least one computing unit, wherein the computing unit has one or more execution units or computing cores, wherein the computing system has a plurality of execution units or computing cores and is configured to execute a plurality of computer program modules in parallel.

[0016] A computing unit according to the invention, for example a control unit of a machine or a motor vehicle, is configured, in particular in terms of programming, to carry out the method according to the invention.

[0017] It is also advantageous to implement the method according to the invention in the form of a computer program or computer program product with a program code for executing all method steps, because this leads to particularly low costs, especially if the control device that performs the execution is also used for other tasks and therefore exists anyway. Finally, a machine-readable storage medium is provided, on which a computer program as described above is stored. Suitable storage media or data carriers for providing computer programs are particularly magnetic, optical and electrical memories, such as hard disks, flash memory, EEPROM, DVD, etc. The program can also be downloaded via a computer network (Internet, intranet, etc.). Such downloading can be performed here in a wired or cabled manner or in a wireless manner (for example, via a WLAN network, 3G, 4G, 5G or 6G connection, etc.).

[0018] Further advantages and embodiments of the invention are apparent from the description and the drawings.

[0019] The invention is schematically illustrated by means of exemplary embodiments in the drawings and is described below with reference to the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 The time sequence is shown, according to which data are provided in the computing system and decisions are made regarding their use.

[0021] Figure 2 An exemplary flow chart corresponding to an embodiment is shown. DETAILED DESCRIPTION

[0022] Figure 1 The time sequence is shown, according to which data are provided in the computing system and decisions are made regarding their use. The present invention can be based on such a sequence as a starting point.

[0023] The computing system is, for example, a processor having a plurality of processor cores C0, C1, C2, in which computer program modules or computer program tasks are executed. Likewise, these processor cores may be processor cores of different processors and / or different computing units.

[0024] The data are provided by two computer program modules executed in the processor cores C1 and C2. These computer program modules represent the providers P1, P2 or data sources of the data. The data are used by another computer program module executed in the processor core C0. Accordingly, this computer program module represents the data processor V. The providers P1, P2 and the data processor V can be computer program modules of the following application software, wherein the application software causes, for example cyclically causes, the execution of the computer program modules.

[0025] exist Figure 1 In FIG. 1 , events of a computer program module are plotted relative to time t. Here, provider P1 provides new data at time t1 and provider P2 provides new data at time t2. The provided data are typically stored in a memory, so that the data processor V can read the data from the memory when it needs the data. However, it is not initially possible for the data processor to identify which data are the newer data, so that the data processor must determine which provider provided the data last if it only uses the latest data.

[0026] In principle, the data can be provided with corresponding time stamps, but in this case overflow states may occur which must be handled separately in order to be able to clearly determine the latest data. This problem is avoided in the present invention by using a particularly non-transitive relationship.

[0027] Figure 2 An exemplary flow chart corresponding to an embodiment of the present invention is shown.

[0028] Assume there are N providers, where each provider i sets its own state variable S i , the state variable has at least N-1, or here for example, N state value entries S i [j] j=1,...,N , that is, each entry can contain a tag element, or each state value can be a tag element. Therefore, these state variables S i It can be viewed as a state array or state vector. For each other provider k≠i, each provider i has its state variable S i The state value S is assigned to i [k]. These state variables are stored, for example, in a memory, wherein in particular each provider and each data processor can read out the state variables (i.e. can provide read access to them) and each provider can change at least its own state variables (i.e. provide write access to them). Here and hereinafter, the indices i, j, k are respectively integers in the range 1 to N (1≤i, j, k≤N).

[0029] As already explained above, the marker elements form a set for which a relation is defined which is non-transitive and is defined such that for any marker element x there exists at least one other marker element y such that xRel y is true and yRel x is false.

[0030] In optional step 100, state variables are first initialized. For this purpose, a further marking element, called undefined marking element U, can be set, wherein the relationship to the set of marking elements containing the undefined marking element U is continued in such a way that every other marking element x is related to the undefined marking element U, which means that for all marking elements x that are not equal to the undefined marking element U it applies that x Rel U is true.

[0031] Formally, referring to the above definition of relation, this can be achieved by choosing M≠N, and more precisely M=N\{U} or N=M∪{U}. The tag elements (including U) are considered to belong to the set N, and for a tag element x (x∈M) of the set M then the following condition applies: for a tag element x, there exists at least one other tag element y such that x Rel y is true and yRel x is false.

[0032] During initialization, for each provider i, in its state variable S i For each state value S assigned to other providers k≠ii [k] Assign undefined marked element U (for all i, k, S i [k]=U, so that i≠k). Other initialization methods can also be used. It is also possible to omit the undefined marker element U, wherein, for example, the method is initially executed without using data and the data are only used when the method has "stabilized".

[0033] In step 110, new data is provided by provider j (e.g., stored in memory). If necessary, the state variable S of the provider providing the new data is j So it is changed so that for all cases where k is not equal to j (k≠j), the relationship S j [k]Rel S k [j] is true, and the relation S k [j]Rel S j [k] is false. If this condition is already met, there is no need to change the state variable. The change or step 110 can be performed in particular by the provider j providing the new data. When a change is made, the corresponding state variable S j Specifically, it is rewritten to the memory.

[0034] As soon as one of the providers provides new data, step 110 is repeated continuously. This is illustrated in the following table for example for four providers. In this case, the state variable S j , three marking elements (here for example A, B, C) are sufficient, for which the following apply: relations A Rel C, B Rel A and C Rel B are true, and the corresponding inverse relations C Rel A, ARel B and B Rel C are false. In addition, an undefined marking element U is used, for which the following apply: relations ARel U, BRel U and C Rel U are true. In the schema described here, the sequence of marking values ​​is "ABCABCABCABC...".

[0035] For each provider, its own or individual state variables are set, which have entries, i.e., state values, for the other providers. The left column indicates which provider provides new data, wherein initialization is performed at the beginning. The right four columns indicate the state variables for providers 1, 2, 3, and 4, which are generated by the actions in the left column, for example, under the above-mentioned conditions. The order of these rows from top to bottom corresponds to the time sequence in which the actions entered in the left column occur. The notation used is that the state variables set for the providers each have four entries, which correspond to the four providers in sequence, wherein an underscore "_" is entered instead of the entry for the provider for which the corresponding state variable is set.

[0036] Provider doing the writing <![CDATA[S1]]> <![CDATA[S2]]> <![CDATA[S3]]> S4 initialization _UUU U_UU UU_U UUU_ 1 _AAA U_UU UU_U UUU_ 2 _AAA B_AA UU_U UUU_ 3 _AAA B_AA BB_A UUU_ 4 _AAA B_AA BB_A BBB_ 1 _CCC B_AA BB_A BBB_ 3 _CCC B_AA AB_C BBB_ 2 _CCC A_CC AB_C BBB_ 3 _CCC A_CC AA_C BBB_ 4 _CCC A_CC AA_C AAA_

[0037] In step 120 , the data processor accesses the data, which should include: accessing the latest data.

[0038] First, in step 125 it is determined which provider last provided the data, wherein, if applicable: for all j not equal to k (j≠k), the relation S k [j]Rel S j [k] is true, then provider k is determined to be the provider of the latest data. Step 125 can in particular be performed by the data processor itself.

[0039] In step 128, the data of provider k, which has been determined as the provider providing the latest data in step 125, is selected and used by the data processor. For example, the data of provider k is read from the memory by the data processor and used within the scope of data processing.

[0040] A design scheme has been described above in which each provider i sets its own state variable S i , these state variables have an entry for each other provider k≠i, namely, a state value S i[k]. Alternatively, it is also possible to use only a unique state variable T, which has an entry, i.e., a state value T[i], for each provider i therein. In step 110, if necessary (i.e., if this condition has not yet been met), the state variable T is changed so that for all k not equal to j (k≠j), the relation T[k]Rel T[j] is true and the relation T[j]Rel T[k] is false. For this purpose, it is sufficient to change the state value T[j], if necessary. In step 125, if applicable: the relation T[j]Rel T[k] is true for all j not equal to k (j≠k), then provider k is similarly determined to be the provider of the latest data. During initialization (step 100), if specified, for example, all entries or state values ​​T[i] of these state variables T are assigned an undefined marking element U. The number of different marking elements required may be different for different designs.

[0041] Access (read and / or write access) to the state variables, i.e. to individual state variables or more generally to the entire group of state variables, should in particular be performed atomically in order to ensure a consistent state of the state variables. If non-atomic access, in particular non-atomic write access, is permitted, it may be possible that the resulting state, which is marked by these state variables, may not be clearly interpretable if two (or more) providers write to the state variables at substantially the same time and therefore provide new data at substantially the same time. That is, the provider of the latest data cannot be clearly selected. In this case (i.e., it is impossible to make a clear selection), for example, a random selection can be made from these two (or more) providers, which corresponds to: the new data is provided by these providers substantially at the same time.

[0042] The following table illustrates the process for two providers P1 and P2 according to the design of the invention. The symbols "xy" are used for these states, wherein the first bit x corresponds to the state variable S1 of provider P1 or indicates the following state value S1[2], which is assigned to provider P2 in the state variable of provider P1, and the second bit y corresponds to the state variable S2 of provider P2 or indicates the following state value S2[1], which is assigned to provider P1 in the state variable of provider P2. In contrast to the above table, the state variables S1, S2 are not shown in different columns, but are shown together, which also corresponds to the state variable T.

[0043] As above, three marking elements A, B, C are used, for which the following apply: relations A Rel C, B Rel A and C Rel B are true, and the corresponding inverse relations C Rel A, A Rel B and B Rel C are false. Additionally, an undefined marking element U is used, for which the following apply: relations A Rel U, B Rel U and C Rel U are true.

[0044] The current status of the providers P1, P2 is entered in the first column. In the second column, the providers whose data are considered to be the latest data, for example to be selected by the data processor, according to the current status given in the first column are entered. In the third column, it is entered which next status is assumed, according to the current status given in the first column, if the provider P1 provides new data. In the fourth column, it is entered which next status is assumed, according to the current status given in the first column, if the provider P2 provides new data.

[0045]

[0046] As can be seen from the first and second columns, it is always possible to unambiguously determine which provider last provided data, except for the state UU, which corresponds to a state in which no provider has yet provided data and is set, for example, during an initialization phase. As can be seen from the first and third or fourth columns, in the case of new data, only the state variable of the provider providing the new data needs to be changed, if necessary.

[0047] In the scheme described here, the order of the tagged values ​​is "ABCABCABCABC...". If the provider that provides new data during an update already occupies the newest position, it remains unchanged. Conversely, if the provider occupies an older position, it is changed to the next newer position. The next newer of the two existing values ​​is determined explicitly from the following aspects:

[0048] If A and B, then B is newer and B remains B, or A becomes C;

[0049] If B and C, then C is newer and C remains C, or B becomes A;

[0050] If C and A, then A is newer and A remains A, or C becomes B.

[0051] In the case of a single state variable T, the data of N-1 providers can thus be arranged in a temporally unambiguous manner using N different marking elements. In the case of multiple state variables, fewer different marking elements are sufficient, for example three, plus undefined marking elements if necessary.

Claims

1. A method for determining current data in a computing system (C0, C1, C2) using a set of marking elements, wherein a plurality of providers (P1, P2) provide data in the computing system, wherein a non-transitive relationship is defined on the set, wherein for each arbitrary first marking element there is at least one other second marking element, such that the first marking element is related to the second marking element, but the second marking element is not related to the first marking element; wherein a state variable is set for each provider (P1, P2), the state variable having the following state value at least for each other provider, the state value being assigned to the respective other provider and being able to use a marking element; in, In case one of the providers (P1, P2) referred to as first providers provides new data, if necessary, the state variables of the first provider are changed (110) so that for each provider different from the first provider, referred to as second providers, it applies that: the state value assigned to the second provider in the state variable of the first provider is correlated with the state value assigned to the first provider in the state variable of the second provider; In which, data provided by one of the providers (P1, P2) referred to as the third provider is determined (125) to be the latest data when the following applies to each provider referred to as the fourth provider that is different from the third provider: the status value assigned to the fourth provider in the status variable of the third provider is correlated with the status value assigned to the third provider in the status variable of the fourth provider.

2. The method according to claim 1, wherein a plurality of state variables are set; wherein a separate state variable of the plurality of state variables is set for each provider.

3. The method of claim 1, wherein a single state variable is set, the single state variable comprising a state value for each provider; wherein the single state variable is set for each provider.

4. A method according to any one of the preceding claims, wherein the state variables are stored in a memory of the computing system. The method according to claim 4 , wherein access to the state variable is performed atomically.

6. A method according to any preceding claim, wherein the state variable is changed or updated by the first provider itself.

7. A method according to any one of the preceding claims, wherein: The providers (P1, P2) are computer program modules in the computing system, which are executed in parallel.

8. A method according to any one of the preceding claims, wherein: A determination is made (125) by a data processor (V) in the computing system that the data provided by the third provider is the most recent data; and wherein the data processor uses the data provided by the third provider (128).

9. The method according to claim 8, wherein the data processor is a computer program task executed in the computing system, in particular if dependent on claim 7, the computer program task is executed in parallel with the provider.

10. A method according to any one of the preceding claims, wherein an undefined marking element is provided, to which each other marking element is related; in, An initialization (100) is performed in which, in the state variables of all providers (P1, P2), the state values ​​are set to undefined flag elements.

11. A method according to any one of the preceding claims, wherein: The set of tag elements is finite and in particular comprises one more element than the number of the plurality of providers (P1, P2). 12 . A computing unit which is configured to execute a plurality of computer program modules in parallel and to carry out all method steps of the method according to claim 1 .

13. A computer system comprising a plurality of communicatively connected computing units, each of which is configured to execute at least one computer program module, which is configured to execute all method steps of the method according to any one of claims 1 to 11.

14. A computer program which, when executed on a computing unit which is configured to execute a plurality of computer program modules in parallel, causes the computing unit to carry out all method steps of the method according to any one of claims 1 to 11.

15. A machine-readable storage medium having stored thereon a computer program according to claim 14.