CN112612455B - Method and system for distinguishing communication modes - Google Patents

Method and system for distinguishing communication modes Download PDF

Info

Publication number
CN112612455B
CN112612455B CN202011415829.XA CN202011415829A CN112612455B CN 112612455 B CN112612455 B CN 112612455B CN 202011415829 A CN202011415829 A CN 202011415829A CN 112612455 B CN112612455 B CN 112612455B
Authority
CN
China
Prior art keywords
port
keyword
dictionary
sending
receiving port
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
CN202011415829.XA
Other languages
Chinese (zh)
Other versions
CN112612455A (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.)
Weichai Power Co Ltd
Original Assignee
Weichai Power 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 Weichai Power Co Ltd filed Critical Weichai Power Co Ltd
Priority to CN202011415829.XA priority Critical patent/CN112612455B/en
Publication of CN112612455A publication Critical patent/CN112612455A/en
Application granted granted Critical
Publication of CN112612455B publication Critical patent/CN112612455B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90348Query processing by searching ordered data, e.g. alpha-numerically ordered data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a system for distinguishing communication modes, wherein the method comprises the following steps: acquiring a port connection relation corresponding to the software combination; based on the port connection relation, respectively creating a transmitting port keyword corresponding to the transmitting port name and a receiving port keyword corresponding to the receiving port name; determining a value corresponding to a transmitting port keyword and a value corresponding to a receiving port keyword in a first dictionary; determining the corresponding relation between the sending port and the receiving port according to the value corresponding to the sending port key word and the value corresponding to the receiving port key word in the first dictionary; storing the corresponding relation of one sending port corresponding to one receiving port to a second dictionary, storing the corresponding relation of one sending port corresponding to a plurality of receiving ports to a third dictionary, and storing the corresponding relation of one receiving port corresponding to a plurality of sending ports to a fourth dictionary; the correspondence relationships stored in the second dictionary to the fourth dictionary correspond to different communication modes, respectively, so as to distinguish the communication modes of the RTE.

Description

Method and system for distinguishing communication modes
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and a system for distinguishing a communication mode.
Background
In the AUTOSAR architecture, a plurality of software components are generally included, and one software combination is constituted by the plurality of software components. Each software component has a plurality of component ports through which a runtime environment (RTE) can implement a communication mechanism between the software components.
Because the connection relationship between the ports of the components can be subdivided into multiple communication modes of the RTE, and the source code of the RTE is generated in different modes of communication, a method for distinguishing the communication modes of the RTE is needed.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide a method and a system for distinguishing communication modes, so as to distinguish the communication modes of RTEs.
In order to achieve the above object, the embodiment of the present invention provides the following technical solutions:
an embodiment of the present invention in a first aspect discloses a method for distinguishing communication modes, the method comprising:
obtaining a port connection relation corresponding to a software combination, wherein the port connection relation at least comprises: providing a software component name of a transmitting port, a transmitting port name, a software component name of a receiving port and a receiving port name;
based on the port connection relation, respectively creating a transmitting port keyword corresponding to the transmitting port name and a receiving port keyword corresponding to the receiving port name;
Judging whether the sending port keywords and the receiving port keywords exist in a preset first dictionary or not respectively, and determining the values corresponding to the sending port keywords and the values corresponding to the receiving port keywords in the first dictionary according to the judging result, wherein the values corresponding to the sending port keywords are 1 or N, the values corresponding to the receiving port keywords are 1 or N, and N is an integer larger than 1;
if the value corresponding to the sending port keyword and the value corresponding to the receiving port keyword in the first dictionary are both 1, the sending port keyword is used as a keyword, and the receiving port keyword is used as a value and is stored in a second dictionary, wherein the content stored in the second dictionary is the corresponding relation of one sending port to one receiving port;
judging whether the sending port keyword exists in a third preset dictionary or not if the value corresponding to the sending port keyword in the first dictionary is N and the value corresponding to the receiving port keyword is 1, storing the sending port keyword as a keyword and the value corresponding to the sending port keyword in the second dictionary as a value in the third dictionary according to the judging result, deleting key value pairs of the sending port keyword in the second dictionary, or adding the receiving port keyword as a value in the third dictionary and the key value pairs of the sending port keyword as a keyword, wherein the content stored in the third dictionary is the corresponding relation of one sending port corresponding to a plurality of receiving ports;
And if the value corresponding to the sending port keyword in the first dictionary is 1 and the value corresponding to the receiving port keyword is N, judging whether the receiving port keyword exists in a fourth dictionary which is preset, storing the receiving port keyword as a keyword and other sending port keywords corresponding to the sending port keyword and the receiving port keyword in the second dictionary as values in the fourth dictionary according to a judging result, deleting key value pairs corresponding to the other sending port keywords in the second dictionary, or adding the sending port keyword as a value to the fourth dictionary in the key value pairs taking the receiving port keyword as a keyword, wherein the content stored in the fourth dictionary is the corresponding relation of one receiving port corresponding to a plurality of sending ports.
Preferably, the determining whether the sending port keyword and the receiving port keyword exist in a preset first dictionary, and determining, according to a determination result, a value corresponding to the sending port keyword and a value corresponding to the receiving port keyword in the first dictionary includes:
judging whether the transmission port keywords exist in a preset first dictionary or not;
If the transmission port keywords exist in the first dictionary, determining that the value corresponding to the transmission port keywords in the first dictionary is N;
if the transmission port keyword does not exist in the first dictionary, determining that a value corresponding to the transmission port keyword in the first dictionary is 1;
judging whether the receiving port keywords exist in the first dictionary or not;
if the receiving port keywords exist in the first dictionary, determining that the value corresponding to the receiving port keywords in the first dictionary is N;
and if the receiving port keyword does not exist in the first dictionary, determining that the value corresponding to the receiving port keyword in the first dictionary is 1.
Preferably, the determining whether the sending port keyword exists in the third dictionary, according to the determination result, storing the sending port keyword as a keyword and a key value pair of the receiving port keyword and the sending port keyword in the second dictionary as a value in the third dictionary, and deleting the key value pair of the sending port keyword in the second dictionary, or adding the receiving port keyword as a value in the third dictionary in the key value pair using the sending port keyword as a keyword, includes:
Judging whether the transmission port keywords exist in a preset third dictionary or not;
if the key value exists, the receiving port key is added to a key value pair taking the sending port key as the key value in the third dictionary as a value;
and if the key value does not exist, taking the transmission port key as the key, taking the value corresponding to the transmission port key as the key in the second dictionary as the value, storing the value into the third dictionary, and deleting the key value pair taking the transmission port key as the key in the second dictionary.
Preferably, the determining whether the receiving port keyword exists in the fourth dictionary, according to the determination result, storing the receiving port keyword as a keyword and other sending port keywords corresponding to the receiving port keyword and the receiving port keyword in the second dictionary as values in the fourth dictionary, or adding the sending port keyword as a value to a key value pair in the fourth dictionary using the receiving port keyword as a keyword, where the key value pair includes:
judging whether the keyword of the receiving port exists in a fourth preset dictionary or not;
If the key value exists, the sending port key is added to a key value pair taking the receiving port key as the key value in the fourth dictionary as a value;
if the key value pair does not exist, determining key value pairs taking the receiving port keywords as values and other sending port keywords as keywords in the second dictionary;
and taking the receiving port keywords as keywords, taking the sending port keywords and the other sending port keywords as values, storing the values into the fourth dictionary, and deleting key value pairs taking the other sending port keywords as keywords in the second dictionary.
Preferably, the creating, based on the port connection relationship, a transmitting port keyword corresponding to the transmitting port name and a receiving port keyword corresponding to the receiving port name respectively includes:
creating a transmission port keyword corresponding to the transmission port name by using the software component name providing the transmission port and the transmission port name in the port connection relation;
and creating a receiving port keyword corresponding to the receiving port name by using the software component name providing the receiving port and the receiving port name in the port connection relation.
Preferably, the obtaining the port connection relationship corresponding to the software combination includes:
and reading the port connection relation corresponding to the software combination from the arxml file corresponding to the software combination.
A second aspect of an embodiment of the present invention discloses a system for distinguishing communication modes, the system comprising:
the device comprises an acquisition unit, a software combination and a control unit, wherein the acquisition unit is used for acquiring a port connection relation corresponding to the software combination, and the port connection relation at least comprises: providing a software component name of a transmitting port, a transmitting port name, a software component name of a receiving port and a receiving port name;
the creation unit is used for respectively creating a sending port keyword corresponding to the sending port name and a receiving port keyword corresponding to the receiving port name based on the port connection relation;
the judging unit is used for judging whether the sending port keywords and the receiving port keywords exist in a preset first dictionary or not respectively, determining the values corresponding to the sending port keywords and the values corresponding to the receiving port keywords in the first dictionary according to the judging result, wherein the values corresponding to the sending port keywords are 1 or N, the values corresponding to the receiving port keywords are 1 or N, and N is an integer larger than 1;
A first processing unit, configured to store, if the value corresponding to the transmitting port keyword and the value corresponding to the receiving port keyword in the first dictionary are both 1, the transmitting port keyword as a keyword and the receiving port keyword as a value into a second dictionary, where a correspondence relationship of one transmitting port to one receiving port is stored in the second dictionary;
a second processing unit, configured to determine whether the sending port keyword exists in a third dictionary that is preset if the value corresponding to the sending port keyword in the first dictionary is N and the value corresponding to the receiving port keyword is 1, store the sending port keyword as a keyword and the value corresponding to the receiving port keyword in the second dictionary with the sending port keyword as a value in the third dictionary according to the determination result, and delete a key value pair of the sending port keyword in the second dictionary, or append the receiving port keyword as a value to a key value pair of the third dictionary with the sending port keyword as a keyword, where the third dictionary stores a correspondence relationship of one sending port corresponding to a plurality of receiving ports;
And the third processing unit is used for judging whether the receiving port keyword exists in a preset fourth dictionary or not if the value corresponding to the sending port keyword in the first dictionary is 1 and the value corresponding to the receiving port keyword is N, storing the receiving port keyword as a keyword and other sending port keywords corresponding to the sending port keyword and the receiving port keyword in the second dictionary as values in the fourth dictionary according to a judging result, deleting key value pairs corresponding to the other sending port keywords in the second dictionary, or adding the sending port keyword as a value to the fourth dictionary in the key value pairs using the receiving port keyword as a keyword, wherein the fourth dictionary stores the corresponding relation of one receiving port corresponding to a plurality of sending ports.
Preferably, the judging unit includes:
the first judging module is used for judging whether the sending port keyword exists in a preset first dictionary or not, if the sending port keyword exists in the first dictionary, determining that the value corresponding to the sending port keyword in the first dictionary is N, and if the sending port keyword does not exist in the first dictionary, determining that the value corresponding to the sending port keyword in the first dictionary is 1;
And the second judging module is used for judging whether the receiving port keyword exists in the first dictionary, if the receiving port keyword exists in the first dictionary, determining that the value corresponding to the receiving port keyword in the first dictionary is N, and if the receiving port keyword does not exist in the first dictionary, determining that the value corresponding to the receiving port keyword in the first dictionary is 1.
Preferably, the second processing unit includes:
the judging module is used for judging whether the transmission port keywords exist in a preset third dictionary or not, if yes, executing the first processing module, and if not, executing the second processing module;
the first processing module is configured to append the receiving port keyword as a value to a key value pair in the third dictionary that uses the sending port keyword as a keyword;
the second processing module is configured to store the sending port keyword as a keyword, store a value corresponding to the sending port keyword as a keyword in the second dictionary as a value in the receiving port keyword, and delete a key value pair corresponding to the sending port keyword as a keyword in the second dictionary.
Preferably, the third processing unit includes:
the judging module is used for judging whether the keyword of the receiving port exists in a fourth preset dictionary, if so, executing the first processing module, and if not, executing the second processing module;
the first processing module is configured to append the sending port keyword as a value to a key value pair in the fourth dictionary that uses the receiving port keyword as a keyword;
the second processing module is configured to determine a key value pair in the second dictionary that uses the receiving port keyword as a value and uses other sending port keywords as keywords, and execute a third processing module;
the third processing module is configured to store the receiving port keyword as a keyword, and the sending port keyword and the other sending port keywords as values in the fourth dictionary, and delete key value pairs in the second dictionary using the other sending port keywords as keywords.
Based on the method and the system for distinguishing the communication modes provided by the embodiment of the invention, the method comprises the following steps: acquiring a port connection relation corresponding to the software combination; based on the port connection relation, respectively creating a transmitting port keyword corresponding to the transmitting port name and a receiving port keyword corresponding to the receiving port name; determining a value corresponding to a transmitting port keyword and a value corresponding to a receiving port keyword in a first dictionary; determining the corresponding relation between the sending port and the receiving port according to the value corresponding to the sending port key word and the value corresponding to the receiving port key word in the first dictionary; storing the corresponding relation of one sending port corresponding to one receiving port to a second dictionary, storing the corresponding relation of one sending port corresponding to a plurality of receiving ports to a third dictionary, and storing the corresponding relation of one receiving port corresponding to a plurality of sending ports to a fourth dictionary; the corresponding relations stored in the second dictionary to the fourth dictionary correspond to different communication modes respectively, so that the communication modes of the RTE are distinguished, and the source codes of the RTE are generated according to the different communication modes.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for distinguishing communication modes according to an embodiment of the present invention;
FIG. 2 is a flowchart of storing related data in a third dictionary according to an embodiment of the present invention;
FIG. 3 is a flowchart of storing related data in a fourth dictionary according to an embodiment of the present invention;
fig. 4 is a block diagram of a system for distinguishing communication modes according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the present disclosure, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As known in the art, an AUTOSAR architecture typically includes a plurality of software components (Software Component, SWCs), and a combination of software may be formed from the plurality of SWCs. Each SWC has multiple component ports (ports) through which a Run-Time environment (RTE) can implement the communication mechanism between the SWCs. Since the connection relationship between the ports of each component can be divided into multiple communication modes of the RTE, and the source code of the RTE in different communication modes is different, it is necessary to distinguish the communication modes of the RTE.
Therefore, the embodiment of the invention provides a method and a system for distinguishing communication modes, which are used for respectively creating a sending port keyword corresponding to a sending port name and a receiving port keyword corresponding to a receiving port name based on a port connection relation by acquiring the port connection relation corresponding to a software combination. And determining a value corresponding to the sending port key word and a value corresponding to the receiving port key word in the first dictionary. And determining the corresponding relation between the sending port and the receiving port according to the value corresponding to the sending port key word and the value corresponding to the receiving port key word in the first dictionary. Storing the corresponding relation of one sending port corresponding to one receiving port into a second dictionary, storing the corresponding relation of one sending port corresponding to a plurality of receiving ports into a third dictionary, and storing the corresponding relation of one receiving port corresponding to a plurality of sending ports into a fourth dictionary. The corresponding relations stored in the second dictionary to the fourth dictionary respectively correspond to different communication modes so as to realize the communication modes for distinguishing RTEs.
It should be noted that, communication connection between software components through ports may be divided into multiple types, and for different communication connection types RTE may support different communication modes, for example: when using Send-Receive type communication, RTE supports three communication modes of 1:n (one sender corresponds to multiple receivers), n:1 (one sender corresponds to one receiver), and 1:1 (one sender corresponds to one receiver), while when using Client-Server type communication, RTE supports two communication modes of 1:n (one Server corresponds to multiple clients) and 1:1 (one Server corresponds to one Client).
Referring to fig. 1, a flowchart of a method for distinguishing communication modes according to an embodiment of the present invention is shown, where the method includes:
step S101: and acquiring the port connection relation corresponding to the software combination.
It should be noted that, the port connection relationship at least includes: a software component name (abbreviated as PPortSWC) that provides a transmit port, a transmit port name (abbreviated as PPort), a software component name (abbreviated as RPortSWC) that provides a receive port, and a receive port name (abbreviated as RPort).
It will be appreciated that the communication mechanism between the SWCs in the software combination, i.e. the port connection relationship between the SWCs corresponding to the software combination, is described in the corresponding arxml file (e.g. composition. Arxml) in the software combination.
In the specific implementation process of step S101, the port connection relationship corresponding to the software combination is read from the arxml file corresponding to the software combination, and the following contents of steps S102 to S106 are executed.
It can be understood that the arxml file of the software combination contains a plurality of port connection relations, and when reading, each port connection relation is read from the arxml file one by one, and the following contents of step S102 to step S106 are executed for each port connection relation read.
Step S102: based on the port connection relation, a transmitting port keyword corresponding to the transmitting port name and a receiving port keyword corresponding to the receiving port name are respectively created.
In the specific implementation process of step S102, a sending port Key (Key 1 for short) corresponding to the sending port name is created by using the software component name and the sending port name that provide the sending port in the port connection relationship, for example: key1=pportswc+_out_ _ out_ _ and PPort.
Creating a receiving port keyword (Key 2 for short) corresponding to the receiving port name by using the software component name and the receiving port name of the providing receiving port in the port connection relationship, for example: key2=rortswc+_in_ _ and RPort.
Step S103: and judging whether the sending port keywords and the receiving port keywords exist in a preset first dictionary or not respectively, and determining the values corresponding to the sending port keywords and the values corresponding to the receiving port keywords in the first dictionary according to the judging result.
In the first dictionary, the value corresponding to the transmitting port key is 1 or N, the value corresponding to the receiving port key is 1 or N, and N is an integer greater than 1.
In the specific implementation step S103, it is determined whether a preset first dictionary (portdictionary) exists in the sending port Key (Key 1), if the sending port Key already exists in the first dictionary, it is determined that a value corresponding to the sending port Key in the first dictionary is N, that is, in the first dictionary, the sending port Key is a Key, and a value corresponding to the sending port Key is modified to be N.
If the transmission port keyword does not exist in the first dictionary, the transmission port keyword is taken as a key, the value corresponding to the transmission port keyword is 1, and the key value pair (the key is the transmission port keyword, the value is 1) is stored in the first dictionary.
Judging whether the receiving port keyword (Key 2) exists in the first dictionary, if the receiving port keyword already exists in the first dictionary, determining that the value corresponding to the receiving port keyword in the first dictionary is N, namely in the first dictionary, the receiving port keyword is a Key, and the value corresponding to the receiving port keyword is modified to be N.
If the receiving port keyword does not exist in the first dictionary, determining that the value corresponding to the receiving port keyword in the first dictionary is 1, that is, taking the receiving port keyword as a key, the value corresponding to the receiving port keyword is 1, and storing the key value pair (the key is the receiving port keyword, the value is 1) into the first dictionary.
Step S104: and if the value corresponding to the sending port keyword and the value corresponding to the receiving port keyword in the first dictionary are both 1, taking the sending port keyword as the keyword and taking the receiving port keyword as the value to be stored in the second dictionary.
It should be noted that, the content stored in the second dictionary is a correspondence relationship between one transmitting port and one receiving port.
In the specific implementation process of step S104, it is determined whether a value (value) corresponding to the key with the sending port key in the first dictionary is 1, and whether a value corresponding to the key with the receiving port key in the first dictionary is 1.
If the value corresponding to the transmitting port key and the value corresponding to the receiving port key in the first dictionary are both 1, the communication mode indicating that the transmitting port name corresponding to the transmitting port key and the receiving port name corresponding to the receiving port key are the above mentioned 1:1 communication mode, the transmitting port key is used as a key and the receiving port key is used as a value (value) to be stored in the second dictionary (in short called as DictOut 1), that is, the corresponding relation of one transmitting port corresponding to one receiving port (in other words, the above mentioned 1:1 communication mode) is indicated by the key value pair stored in the second dictionary.
That is, keys of key-value pairs in the second dictionary may correspond to a transmit port name (PPort), and value may correspond to a receive port name (RPort).
Step S105: if the value corresponding to the sending port keyword in the first dictionary is N and the value corresponding to the receiving port keyword is 1, judging whether the sending port keyword exists in a preset third dictionary, storing the sending port keyword as a keyword and the value corresponding to the sending port keyword as a keyword in the second dictionary as a value in the third dictionary according to the judging result, deleting the key value pair of the sending port keyword in the second dictionary, or adding the receiving port keyword as a value to the key value pair of the sending port keyword as a keyword in the third dictionary.
It should be noted that, the content stored in the third dictionary is a correspondence relationship between one transmitting port and a plurality of receiving ports.
In the specific implementation process of step S105, if the value corresponding to the transmitting port keyword in the first dictionary is N and the value corresponding to the receiving port keyword is 1, it is indicated that the transmitting port name (i.e. PPort) corresponding to the transmitting port keyword is used multiple times, and at this time, the communication mode of the transmitting port name and the receiving port name is the above-mentioned connection relationship of 1:n.
It is first determined whether the transmission port key is already in a preset third dictionary (abbreviated dcittout 2). If the transmission port key already exists in the third dictionary, the reception port key is added as a value to a key value pair (one-key multi-value case) in the third dictionary, in which the transmission port key is used as a key, that is, in the third dictionary, a plurality of values can be corresponding to the transmission port key as a key.
If the transmission port Key does not exist in the third dictionary, it is known from the foregoing that the correlation processing from step S102 to step S106 is performed on the port connection relationship corresponding to the software combination piece by piece, and if the occurrence of the port Key does not exist in the third dictionary, the value (DictOut 1[ Key1 ]) corresponding to the transmission port Key as the Key in the second dictionary is searched from the second dictionary (DictOut 1) with the transmission port Key (Key 1) as the Key. And taking the transmission port keyword as a Key, taking a value (DictOut 1[ Key1 ]) corresponding to the transmission port keyword as a Key in the receiving port keyword (Key 2) and the second dictionary as a value, and storing the Key value pair (Key is the transmission port keyword, the value is Key2 and DictOut1[ Key1 ]) into the third dictionary, wherein at the moment, the Key value pair of the transmission port keyword in the second dictionary, namely the Key value pair corresponding to DictOut1[ Key1] in the second dictionary is deleted.
Step S106: if the value corresponding to the sending port keyword in the first dictionary is 1 and the value corresponding to the receiving port keyword is N, judging whether the receiving port keyword exists in a preset fourth dictionary, storing the receiving port keyword as a keyword and other sending port keywords corresponding to the sending port keyword and the receiving port keyword in the second dictionary as values in the fourth dictionary according to the judging result, and deleting key value pairs corresponding to the other sending port keywords in the second dictionary, or adding the sending port keyword as a value to the fourth dictionary to use the receiving port keyword as a key value pair of the keyword.
It should be noted that, the content stored in the fourth dictionary is a correspondence relationship between one receiving port and a plurality of transmitting ports.
In the specific implementation of step S106, if the value corresponding to the transmitting port key in the first dictionary is 1 and the value corresponding to the receiving port key is N, it is indicated that the receiving port name (RPort) corresponding to the receiving port key is used multiple times, and at this time, the communication mode between the transmitting port name and the receiving port name is the above-mentioned connection relationship of N: 1.
Firstly, judging whether a preset fourth dictionary (called DictOut3 for short) exists in the receiving port keyword (Key 2), if so, taking the sending port keyword (Key 1) as a value, and adding the value as a Key value pair (in the case of one-Key multiple-value) taking the receiving port keyword as a Key in the fourth dictionary, namely, taking the receiving port keyword as a Key in the fourth dictionary, wherein the Key value pair can correspond to a plurality of values.
If the receiving port Key does not exist in the fourth dictionary, it is known from the above that the receiving port name corresponding to the receiving port Key corresponds to a plurality of sending port names, so the receiving port Key is used as a value to traverse in the second dictionary (DictOut 1), the value in the second dictionary is queried as a Key corresponding to the receiving port Key, the Key is other sending port Key (called Key 3), that is, in the second dictionary, the value corresponding to the other sending port Key as a Key is the receiving port Key (namely DictOut1[ Key3] = Key 2), in this case, the receiving port Key (Key 2) is used as a Key, the sending port Key (Key 1) and the other sending port Key (Key 3) are used as a value, the Key value pair (Key is the receiving port Key, the Key is Key1 and the Key 3) is stored in the fourth dictionary, that is, and the Key value pair (Key 1 and Key 3) is deleted in the second dictionary, namely, the Key pair of the Key1 and the Key3 is deleted in the second dictionary.
Through the contents of the steps S101 to S106, the connection relationships of each port of the software combination are processed in a related manner one by one, and the processing results are stored in the second dictionary to the fourth dictionary respectively, and finally, the content stored in the second dictionary is the corresponding relationship (the above mentioned 1:1 communication mode) that one transmitting port corresponds to one receiving port, that is, the key in the second dictionary corresponds to the transmitting port name, and the value corresponds to the receiving port name.
The content stored in the third dictionary is the correspondence between one sending port and a plurality of receiving ports (the above mentioned communication mode of 1:n, where n represents a receiving port), that is, the key in the third dictionary corresponds to a sending port name, the value corresponds to a receiving port name, and one key corresponds to a plurality of values.
The content stored in the fourth dictionary is the correspondence between one receiving port and a plurality of transmitting ports (the above-mentioned n:1 communication mode, where n represents a transmitting port), that is, the key in the fourth dictionary corresponds to the receiving port name, the value corresponds to the transmitting port name, and one key corresponds to a plurality of values.
And dividing the connection relation of the RTE into communication modes of 1:1, 1:n and n:1 through the corresponding relation stored in the second dictionary to the fourth dictionary, so that the mode of generating the source code of the RTE can be determined according to different communication modes.
In the embodiment of the invention, the port connection relation corresponding to the software combination is obtained, and the sending port keywords corresponding to the sending port names and the receiving port keywords corresponding to the receiving port names are respectively created based on the port connection relation. And determining a value corresponding to the sending port key word and a value corresponding to the receiving port key word in the first dictionary. And determining the corresponding relation between the sending port and the receiving port according to the value corresponding to the sending port key word and the value corresponding to the receiving port key word in the first dictionary. Storing the corresponding relation of one sending port corresponding to one receiving port into a second dictionary, storing the corresponding relation of one sending port corresponding to a plurality of receiving ports into a third dictionary, and storing the corresponding relation of one receiving port corresponding to a plurality of sending ports into a fourth dictionary. The corresponding relations stored in the second dictionary to the fourth dictionary respectively correspond to different communication modes so as to realize the communication modes for distinguishing RTEs.
The above-mentioned process of storing relevant data in the third dictionary mentioned in step S105 of fig. 1 in the embodiment of the present invention, referring to fig. 2, shows a flowchart of storing relevant data in the third dictionary provided in the embodiment of the present invention, including the following steps:
Step S201: judging whether the transmission port keywords exist in a preset third dictionary or not. If so, step S202 is performed, and if not, step S203 is performed.
Step S202: the receiving port key is added as a value to a key value pair in the third dictionary to send the port key as a key.
Step S203: and taking the sending port keyword as a keyword, taking a value corresponding to the sending port keyword as the keyword in the second dictionary as a value, storing the value into the third dictionary, and deleting a key value pair taking the sending port keyword as the keyword in the second dictionary.
It should be noted that, the specific content of the steps S201 to S203 can be referred to the content of the step S105 in the embodiment of the present invention shown in fig. 1, and will not be described herein again.
In the embodiment of the invention, whether the transmission port keywords exist in the third dictionary is judged, and the transmission port keywords are used as keys and corresponding data are used as values to be stored in the third dictionary according to the judging result, so that the content stored in the third dictionary is the corresponding relation of one transmission port corresponding to a plurality of receiving ports, and the communication mode for distinguishing RTEs is realized.
The above-mentioned process of storing relevant data in the fourth dictionary mentioned in step S106 of fig. 2 in the embodiment of the present invention, referring to fig. 3, shows a flowchart of storing relevant data in the fourth dictionary provided in the embodiment of the present invention, and includes the following steps:
step S301: judging whether the keyword of the receiving port exists in a fourth preset dictionary or not. If so, step S302 is performed, and if not, step S303 is performed.
Step S302: the sending port key is added as a value to a key value pair in the fourth dictionary to receive the port key as a key.
In the specific implementation process of step S302, if the receiving port keyword exists in the fourth dictionary, the sending port keyword is taken as a value, and the value is added to a key value pair taking the receiving port keyword as a key in the fourth dictionary.
Step S303: key-value pairs in the second dictionary are determined having the receive port key as a value and other transmit port keys as keys.
In the process of implementing step S303, if the receiving port keyword does not exist in the fourth dictionary, the receiving port keyword is taken as a value, a key value pair corresponding to the value being the receiving port keyword is determined from the second dictionary, and the key in the key value pair is the other sending port keyword, that is, in the second dictionary, the value corresponding to the other sending port keyword being the key is taken as the receiving port keyword, and step S304 is executed.
Step S304: and storing the receiving port keywords as keywords, and the sending port keywords and other sending port keywords as values into a fourth dictionary, and deleting key value pairs taking the other sending port keywords as keywords in the second dictionary.
In the specific implementation process of step S304, the receiving port key is used as a key, the sending port key and other sending port keys are used as values, the key value pair is stored in the fourth dictionary, and key value pairs using other sending port keys as keys in the second dictionary are deleted.
In the embodiment of the invention, whether the receiving port keywords exist in the fourth dictionary is judged, and the receiving port keywords are used as keys and corresponding data are used as values to be stored in the fourth dictionary according to the judging result, so that the content stored in the fourth dictionary is the corresponding relation of one receiving port corresponding to a plurality of sending ports, and the communication mode for distinguishing RTEs is realized.
Corresponding to the method for distinguishing communication modes provided in the above embodiment of the present invention, referring to fig. 4, the embodiment of the present invention further provides a block diagram of a system for distinguishing communication modes, where the system includes: an acquisition unit 401, a creation unit 402, a judgment unit 403, a first processing unit 404, a second processing unit 405, and a third processing unit 406;
The obtaining unit 401 is configured to obtain a port connection relationship corresponding to the software combination, where the port connection relationship at least includes: a software component name providing a transmit port, a transmit port name, a software component name providing a receive port, and a receive port name.
In a specific implementation, the obtaining unit 401 is specifically configured to: and reading the port connection relation corresponding to the software combination from the arxml file corresponding to the software combination.
A creating unit 402, configured to create a transmitting port keyword corresponding to a transmitting port name and a receiving port keyword corresponding to a receiving port name, respectively, based on the port connection relationship.
In a specific implementation, the creation unit 402 is specifically configured to: creating a transmitting port keyword corresponding to the transmitting port name by using the software component name and the transmitting port name of the providing transmitting port in the port connection relation, and creating a receiving port keyword corresponding to the receiving port name by using the software component name and the receiving port name of the providing receiving port in the port connection relation.
The judging unit 403 is configured to judge whether the sending port keyword and the receiving port keyword exist in a preset first dictionary, and determine, according to a judgment result, a value corresponding to the sending port keyword and a value corresponding to the receiving port keyword in the first dictionary, where the value corresponding to the sending port keyword is 1 or N, and the value corresponding to the receiving port keyword is 1 or N, where N is an integer greater than 1.
The first processing unit 404 is configured to store the sending port key as a key and the receiving port key as a value in the second dictionary, where the second dictionary stores a correspondence relationship between one sending port and one receiving port, if the value corresponding to the sending port key and the value corresponding to the receiving port key in the first dictionary are both 1.
And the second processing unit 405 is configured to determine whether the sending port keyword exists in a third dictionary that is preset if the value corresponding to the sending port keyword in the first dictionary is N and the value corresponding to the receiving port keyword is 1, store the sending port keyword as a keyword and the value corresponding to the receiving port keyword as a keyword in the second dictionary as a value in the third dictionary according to the determination result, and delete the key value pair of the sending port keyword in the second dictionary, or add the receiving port keyword as a value to the key value pair of the third dictionary with the sending port keyword as a keyword, where the third dictionary stores the correspondence relationship of one sending port corresponding to a plurality of receiving ports.
And a third processing unit 406, configured to determine whether the receiving port keyword exists in a fourth dictionary that is preset if the value corresponding to the sending port keyword in the first dictionary is 1 and the value corresponding to the receiving port keyword is N, store the receiving port keyword as a keyword and other sending port keywords corresponding to the sending port keyword and the receiving port keyword in the second dictionary as values in the fourth dictionary according to the determination result, and delete key value pairs corresponding to the other sending port keywords in the second dictionary, or append the sending port keyword as a value to the fourth dictionary in the key value pair with the receiving port keyword as a keyword, where the fourth dictionary stores the correspondence relationship of one receiving port corresponding to a plurality of sending ports.
In the embodiment of the invention, the port connection relation corresponding to the software combination is obtained, and the sending port keywords corresponding to the sending port names and the receiving port keywords corresponding to the receiving port names are respectively created based on the port connection relation. And determining a value corresponding to the sending port key word and a value corresponding to the receiving port key word in the first dictionary. And determining the corresponding relation between the sending port and the receiving port according to the value corresponding to the sending port key word and the value corresponding to the receiving port key word in the first dictionary. Storing the corresponding relation of one sending port corresponding to one receiving port into a second dictionary, storing the corresponding relation of one sending port corresponding to a plurality of receiving ports into a third dictionary, and storing the corresponding relation of one receiving port corresponding to a plurality of sending ports into a fourth dictionary. The corresponding relations stored in the second dictionary to the fourth dictionary respectively correspond to different communication modes so as to realize the communication modes for distinguishing RTEs.
Preferably, in conjunction with the content of fig. 4, the judging unit 403 includes a first judging module and a second judging module, and the execution principle of each module is as follows:
the first judging module is used for judging whether the sending port keywords exist in a preset first dictionary or not, if the sending port keywords exist in the first dictionary, determining that the value corresponding to the sending port keywords in the first dictionary is N, and if the sending port keywords do not exist in the first dictionary, determining that the value corresponding to the sending port keywords in the first dictionary is 1.
The second judging module is used for judging whether the receiving port keyword exists in the first dictionary or not, if the receiving port keyword exists in the first dictionary, determining that the value corresponding to the receiving port keyword in the first dictionary is N, and if the receiving port keyword does not exist in the first dictionary, determining that the value corresponding to the receiving port keyword in the first dictionary is 1.
Preferably, in conjunction with the content of fig. 4, the second processing unit 405 includes: the execution principle of each module is as follows:
the judging module is used for judging whether the transmission port keywords exist in a preset third dictionary, if yes, executing the first processing module, and if not, executing the second processing module.
And the first processing module is used for adding the receiving port keyword as a value to a key value pair of the third dictionary to send the port keyword as the keyword.
And the second processing module is used for taking the sending port keyword as a keyword, taking a value corresponding to the sending port keyword as the keyword in the second dictionary as a value, storing the value into the third dictionary, and deleting a key value pair taking the sending port keyword as the keyword in the second dictionary.
In the embodiment of the invention, whether the transmission port keywords exist in the third dictionary is judged, and the transmission port keywords are used as keys and corresponding data are used as values to be stored in the third dictionary according to the judging result, so that the content stored in the third dictionary is the corresponding relation of one transmission port corresponding to a plurality of receiving ports, and the communication mode for distinguishing RTEs is realized.
Preferably, in conjunction with the content of fig. 4, the third processing unit 406 includes: the system comprises a judging module, a first processing module, a second processing module and a third processing module, wherein the execution principle of each module is as follows:
the judging module is used for judging whether the keyword of the receiving port exists in a fourth preset dictionary, if so, executing the first processing module, and if not, executing the second processing module.
And the first processing module is used for adding the sending port keyword as a value into a key value pair of the fourth dictionary to receive the port keyword as a keyword.
And the second processing module is used for determining key value pairs taking the receiving port keywords as values and other sending port keywords as keywords in the second dictionary, and executing the third processing module.
And the third processing module is used for taking the receiving port keywords as keywords, taking the sending port keywords and other sending port keywords as values, storing the values into the fourth dictionary, and deleting key value pairs taking the other sending port keywords as keywords in the second dictionary.
In the embodiment of the invention, whether the receiving port keywords exist in the fourth dictionary is judged, and the receiving port keywords are used as keys and corresponding data are used as values to be stored in the fourth dictionary according to the judging result, so that the content stored in the fourth dictionary is the corresponding relation of one receiving port corresponding to a plurality of sending ports, and the communication mode for distinguishing RTEs is realized.
In summary, the embodiment of the invention provides a method and a system for distinguishing communication modes, which are used for respectively creating a transmitting port keyword corresponding to a transmitting port name and a receiving port keyword corresponding to a receiving port name based on a port connection relation by acquiring the port connection relation corresponding to a software combination. And determining a value corresponding to the sending port key word and a value corresponding to the receiving port key word in the first dictionary. And determining the corresponding relation between the sending port and the receiving port according to the value corresponding to the sending port key word and the value corresponding to the receiving port key word in the first dictionary. Storing the corresponding relation of one sending port corresponding to one receiving port into a second dictionary, storing the corresponding relation of one sending port corresponding to a plurality of receiving ports into a third dictionary, and storing the corresponding relation of one receiving port corresponding to a plurality of sending ports into a fourth dictionary. The corresponding relations stored in the second dictionary to the fourth dictionary respectively correspond to different communication modes so as to realize the communication modes for distinguishing RTEs.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of distinguishing communication modes, the method comprising:
obtaining a port connection relation corresponding to a software combination, wherein the port connection relation at least comprises: providing a software component name of a transmitting port, a transmitting port name, a software component name of a receiving port and a receiving port name;
based on the port connection relation, respectively creating a transmitting port keyword corresponding to the transmitting port name and a receiving port keyword corresponding to the receiving port name;
judging whether the sending port keywords and the receiving port keywords exist in a preset first dictionary or not respectively, and determining the values corresponding to the sending port keywords and the values corresponding to the receiving port keywords in the first dictionary according to the judging result, wherein the values corresponding to the sending port keywords are 1 or N, the values corresponding to the receiving port keywords are 1 or N, and N is an integer larger than 1;
If the value corresponding to the sending port keyword and the value corresponding to the receiving port keyword in the first dictionary are both 1, the sending port keyword is used as a keyword, and the receiving port keyword is used as a value and is stored in a second dictionary, wherein the content stored in the second dictionary is the corresponding relation of one sending port to one receiving port;
judging whether the sending port keyword exists in a third preset dictionary or not if the value corresponding to the sending port keyword in the first dictionary is N and the value corresponding to the receiving port keyword is 1, storing the sending port keyword as a keyword and the value corresponding to the sending port keyword in the second dictionary as a value in the third dictionary according to the judging result, deleting key value pairs of the sending port keyword in the second dictionary, or adding the receiving port keyword as a value in the third dictionary and the key value pairs of the sending port keyword as a keyword, wherein the content stored in the third dictionary is the corresponding relation of one sending port corresponding to a plurality of receiving ports;
And if the value corresponding to the sending port keyword in the first dictionary is 1 and the value corresponding to the receiving port keyword is N, judging whether the receiving port keyword exists in a fourth dictionary which is preset, storing the receiving port keyword as a keyword and other sending port keywords corresponding to the sending port keyword and the receiving port keyword in the second dictionary as values in the fourth dictionary according to a judging result, deleting key value pairs corresponding to the other sending port keywords in the second dictionary, or adding the sending port keyword as a value to the fourth dictionary in the key value pairs taking the receiving port keyword as a keyword, wherein the content stored in the fourth dictionary is the corresponding relation of one receiving port corresponding to a plurality of sending ports.
2. The method according to claim 1, wherein the determining whether the sending port keyword and the receiving port keyword exist in a preset first dictionary, and determining the value corresponding to the sending port keyword and the value corresponding to the receiving port keyword in the first dictionary according to the determination result includes:
Judging whether the transmission port keywords exist in a preset first dictionary or not;
if the transmission port keywords exist in the first dictionary, determining that the value corresponding to the transmission port keywords in the first dictionary is N;
if the transmission port keyword does not exist in the first dictionary, determining that a value corresponding to the transmission port keyword in the first dictionary is 1;
judging whether the receiving port keywords exist in the first dictionary or not;
if the receiving port keywords exist in the first dictionary, determining that the value corresponding to the receiving port keywords in the first dictionary is N;
and if the receiving port keyword does not exist in the first dictionary, determining that the value corresponding to the receiving port keyword in the first dictionary is 1.
3. The method according to claim 1, wherein the determining whether the transmission port keyword exists in a preset third dictionary, according to the determination result, storing the transmission port keyword as a keyword and a key value pair of the reception port keyword and the transmission port keyword in the second dictionary as a value into the third dictionary, and deleting the key value pair of the transmission port keyword in the second dictionary, or adding the reception port keyword as a value to the key value pair of the third dictionary with the transmission port keyword as a keyword, includes:
Judging whether the transmission port keywords exist in a preset third dictionary or not;
if the key value exists, the receiving port key is added to a key value pair taking the sending port key as the key value in the third dictionary as a value;
and if the key value does not exist, taking the transmission port key as the key, taking the value corresponding to the transmission port key as the key in the second dictionary as the value, storing the value into the third dictionary, and deleting the key value pair taking the transmission port key as the key in the second dictionary.
4. The method according to claim 1, wherein the determining whether the receiving port keyword exists in a fourth dictionary, according to the determination result, storing the receiving port keyword as a keyword and other sending port keywords corresponding to the receiving port keyword and the receiving port keyword in the second dictionary as values into the fourth dictionary, or adding the sending port keyword as a value to a key value pair in the fourth dictionary using the receiving port keyword as a keyword, includes:
Judging whether the keyword of the receiving port exists in a fourth preset dictionary or not;
if the key value exists, the sending port key is added to a key value pair taking the receiving port key as the key value in the fourth dictionary as a value;
if the key value pair does not exist, determining key value pairs taking the receiving port keywords as values and other sending port keywords as keywords in the second dictionary;
and taking the receiving port keywords as keywords, taking the sending port keywords and the other sending port keywords as values, storing the values into the fourth dictionary, and deleting key value pairs taking the other sending port keywords as keywords in the second dictionary.
5. The method according to claim 1, wherein creating the transmission port key corresponding to the transmission port name and the reception port key corresponding to the reception port name based on the port connection relation, respectively, comprises:
creating a transmission port keyword corresponding to the transmission port name by using the software component name providing the transmission port and the transmission port name in the port connection relation;
And creating a receiving port keyword corresponding to the receiving port name by using the software component name providing the receiving port and the receiving port name in the port connection relation.
6. The method of claim 1, wherein the obtaining the port connection relationship corresponding to the software combination includes:
and reading the port connection relation corresponding to the software combination from the arxml file corresponding to the software combination.
7. A system for distinguishing communication modes, the system comprising:
the device comprises an acquisition unit, a software combination and a control unit, wherein the acquisition unit is used for acquiring a port connection relation corresponding to the software combination, and the port connection relation at least comprises: providing a software component name of a transmitting port, a transmitting port name, a software component name of a receiving port and a receiving port name;
the creation unit is used for respectively creating a sending port keyword corresponding to the sending port name and a receiving port keyword corresponding to the receiving port name based on the port connection relation;
the judging unit is used for judging whether the sending port keywords and the receiving port keywords exist in a preset first dictionary or not respectively, determining the values corresponding to the sending port keywords and the values corresponding to the receiving port keywords in the first dictionary according to the judging result, wherein the values corresponding to the sending port keywords are 1 or N, the values corresponding to the receiving port keywords are 1 or N, and N is an integer larger than 1;
A first processing unit, configured to store, if the value corresponding to the transmitting port keyword and the value corresponding to the receiving port keyword in the first dictionary are both 1, the transmitting port keyword as a keyword and the receiving port keyword as a value into a second dictionary, where a correspondence relationship of one transmitting port to one receiving port is stored in the second dictionary;
a second processing unit, configured to determine whether the sending port keyword exists in a third dictionary that is preset if the value corresponding to the sending port keyword in the first dictionary is N and the value corresponding to the receiving port keyword is 1, store the sending port keyword as a keyword and the value corresponding to the receiving port keyword in the second dictionary with the sending port keyword as a value in the third dictionary according to the determination result, and delete a key value pair of the sending port keyword in the second dictionary, or append the receiving port keyword as a value to a key value pair of the third dictionary with the sending port keyword as a keyword, where the third dictionary stores a correspondence relationship of one sending port corresponding to a plurality of receiving ports;
And the third processing unit is used for judging whether the receiving port keyword exists in a preset fourth dictionary or not if the value corresponding to the sending port keyword in the first dictionary is 1 and the value corresponding to the receiving port keyword is N, storing the receiving port keyword as a keyword and other sending port keywords corresponding to the sending port keyword and the receiving port keyword in the second dictionary as values in the fourth dictionary according to a judging result, deleting key value pairs corresponding to the other sending port keywords in the second dictionary, or adding the sending port keyword as a value to the fourth dictionary in the key value pairs using the receiving port keyword as a keyword, wherein the fourth dictionary stores the corresponding relation of one receiving port corresponding to a plurality of sending ports.
8. The system according to claim 7, wherein the judging unit includes:
the first judging module is used for judging whether the sending port keyword exists in a preset first dictionary or not, if the sending port keyword exists in the first dictionary, determining that the value corresponding to the sending port keyword in the first dictionary is N, and if the sending port keyword does not exist in the first dictionary, determining that the value corresponding to the sending port keyword in the first dictionary is 1;
And the second judging module is used for judging whether the receiving port keyword exists in the first dictionary, if the receiving port keyword exists in the first dictionary, determining that the value corresponding to the receiving port keyword in the first dictionary is N, and if the receiving port keyword does not exist in the first dictionary, determining that the value corresponding to the receiving port keyword in the first dictionary is 1.
9. The system of claim 7, wherein the second processing unit comprises:
the judging module is used for judging whether the transmission port keywords exist in a preset third dictionary or not, if yes, executing the first processing module, and if not, executing the second processing module;
the first processing module is configured to append the receiving port keyword as a value to a key value pair in the third dictionary that uses the sending port keyword as a keyword;
the second processing module is configured to store the sending port keyword as a keyword, store a value corresponding to the sending port keyword as a keyword in the second dictionary as a value in the receiving port keyword, and delete a key value pair corresponding to the sending port keyword as a keyword in the second dictionary.
10. The system of claim 7, wherein the third processing unit comprises:
the judging module is used for judging whether the keyword of the receiving port exists in a fourth preset dictionary, if so, executing the first processing module, and if not, executing the second processing module;
the first processing module is configured to append the sending port keyword as a value to a key value pair in the fourth dictionary that uses the receiving port keyword as a keyword;
the second processing module is configured to determine a key value pair in the second dictionary that uses the receiving port keyword as a value and uses other sending port keywords as keywords, and execute a third processing module;
the third processing module is configured to store the receiving port keyword as a keyword, and the sending port keyword and the other sending port keywords as values in the fourth dictionary, and delete key value pairs in the second dictionary using the other sending port keywords as keywords.
CN202011415829.XA 2020-12-04 2020-12-04 Method and system for distinguishing communication modes Active CN112612455B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011415829.XA CN112612455B (en) 2020-12-04 2020-12-04 Method and system for distinguishing communication modes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011415829.XA CN112612455B (en) 2020-12-04 2020-12-04 Method and system for distinguishing communication modes

Publications (2)

Publication Number Publication Date
CN112612455A CN112612455A (en) 2021-04-06
CN112612455B true CN112612455B (en) 2023-08-18

Family

ID=75229069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011415829.XA Active CN112612455B (en) 2020-12-04 2020-12-04 Method and system for distinguishing communication modes

Country Status (1)

Country Link
CN (1) CN112612455B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102510346A (en) * 2011-11-18 2012-06-20 百度在线网络技术(北京)有限公司 Method, system and device for testing network equipment
CN102819426A (en) * 2012-02-29 2012-12-12 浙江大学 Method for synchronizing AUTOSAR (automotive open system architecture) model to Simulink model
CN105656665A (en) * 2015-12-24 2016-06-08 浪潮集团有限公司 Switch port configuring method and switch
JP2016111407A (en) * 2014-12-02 2016-06-20 日立金属株式会社 Switch device and relay system
CN110377276A (en) * 2019-07-19 2019-10-25 潍柴动力股份有限公司 Source code file management method and equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7620741B2 (en) * 2005-04-22 2009-11-17 Sun Microsystems, Inc. Proxy-based device sharing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102510346A (en) * 2011-11-18 2012-06-20 百度在线网络技术(北京)有限公司 Method, system and device for testing network equipment
CN102819426A (en) * 2012-02-29 2012-12-12 浙江大学 Method for synchronizing AUTOSAR (automotive open system architecture) model to Simulink model
JP2016111407A (en) * 2014-12-02 2016-06-20 日立金属株式会社 Switch device and relay system
CN105656665A (en) * 2015-12-24 2016-06-08 浪潮集团有限公司 Switch port configuring method and switch
CN110377276A (en) * 2019-07-19 2019-10-25 潍柴动力股份有限公司 Source code file management method and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于AUTOSAR的天然气发动机应用层软件组件设计;吴习文等;《农业装备与车辆工程》;第58卷(第5期);第30-35页 *

Also Published As

Publication number Publication date
CN112612455A (en) 2021-04-06

Similar Documents

Publication Publication Date Title
US6272536B1 (en) System and method for the distribution of code and data
US5842216A (en) System for sending small positive data notification messages over a network to indicate that a recipient node should obtain a particular version of a particular data item
US10817873B2 (en) Auditing of electronic documents
US7877461B1 (en) System and method for adding dynamic information to digitally signed mobile applications
US20070220083A1 (en) Estimation of initial dynamic rendering control data
US9118696B2 (en) Method, data transfer arrangement, server and terminal device for updating information in a terminal device
CN113342854B (en) Method and system for generating unique ID of mobile equipment
CN105515900A (en) Method and device for acquiring on-line state of terminal
CN105553727A (en) Method, device and system for updating configuration information
EP3959643A1 (en) Property grouping for change detection in distributed storage systems
US20140156687A1 (en) Identifying duplicate files
CN111240892B (en) Data backup method and device
JP2004310371A (en) System, method, server for sharing file and client terminal for file sharing service, file sharing program and recording medium with program recorded
CN105208108A (en) File uploading/downloading method and system in Web environment, server and client end
JP2011096045A (en) Computer, computer system and method for executing application
US6912543B2 (en) Object-oriented method and system for transferring a file system
CN104394227A (en) Method and system for transmitting user data of browser and browser
CN109598131A (en) A kind of file upload, method for down loading, device, electronic equipment and storage medium
CN114390044B (en) File uploading method, system, equipment and storage medium
CN110311855B (en) User message processing method and device, electronic equipment and storage medium
CN112612455B (en) Method and system for distinguishing communication modes
CN111339547B (en) Method for generating data tag, electronic device and computer storage medium
CN107608722B (en) Application program downloading method and device
US7640260B2 (en) Valid transformation expressions for structured data
KR20050032035A (en) Method for broadcast of an html application

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