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

Method and system for distinguishing communication modes Download PDF

Info

Publication number
CN112612455A
CN112612455A CN202011415829.XA CN202011415829A CN112612455A CN 112612455 A CN112612455 A CN 112612455A CN 202011415829 A CN202011415829 A CN 202011415829A CN 112612455 A CN112612455 A CN 112612455A
Authority
CN
China
Prior art keywords
dictionary
port
keyword
key
sending
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011415829.XA
Other languages
Chinese (zh)
Other versions
CN112612455B (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

Images

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

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; 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; determining a value corresponding to a sending port keyword and a value corresponding to a receiving port keyword in a first dictionary; determining the corresponding relation between a sending port and a receiving port according to the value corresponding to the key word of the sending port and the value corresponding to the key word of the receiving port in the first dictionary; storing the corresponding relation of one transmitting port corresponding to one receiving port in a second dictionary, storing the corresponding relation of one transmitting port corresponding to a plurality of receiving ports in a third dictionary, and storing the corresponding relation of one receiving port corresponding to a plurality of transmitting ports in a fourth dictionary; the correspondence relations stored in the second dictionary to the fourth dictionary correspond to different communication modes respectively, so that the RTE communication modes are distinguished.

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 automotive architecture, a plurality of software components are generally included, and a software combination is formed by the plurality of software components. Each software component has a plurality of component ports through which a Run-Time environment (RTE) can implement a communication mechanism between the software components.
Since the connection relationship between each component port can be subdivided into multiple communication modes of the RTE, and the ways of generating source codes of the RTE in different communication modes are different, a method capable of distinguishing the communication modes of the RTE is needed.
Disclosure of Invention
In view of the above, embodiments of the present invention provide a method and a system for distinguishing communication modes to distinguish the communication modes of an RTE.
In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:
the first aspect of the embodiments of the present invention discloses a method for distinguishing communication modes, where the method includes:
acquiring a port connection relation corresponding to the software combination, wherein the port connection relation at least comprises: providing a software component name of a sending port, a sending port name, a software component name of a receiving port and a receiving port name;
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;
respectively judging whether the sending port keyword and the receiving port keyword exist in a preset first dictionary, and determining a value corresponding to the sending port keyword and a value corresponding to the receiving port keyword in the first dictionary according to a judgment result, wherein the value corresponding to the sending port keyword is 1 or N, the value corresponding to the receiving port keyword is 1 or N, and N is an integer greater 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, taking the sending port keyword as a keyword and the receiving port keyword as a value to be stored in a second dictionary, wherein the content stored in the second dictionary is the corresponding relation of one sending port corresponding to one receiving port;
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 receiving port keyword and the value corresponding to the sending port keyword in the second dictionary as values into the third dictionary according to a judgment result, and deleting a key value pair of the sending port keyword in the second dictionary, or adding the receiving port keyword as a value into a key value pair of the third dictionary with the sending port keyword as a keyword, wherein the content stored in the third dictionary is the corresponding relation of one sending port to a plurality of receiving ports;
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 into the fourth dictionary according to a judgment 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 into a key value pair in the fourth dictionary with 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 respectively determining whether the sending port keyword and the receiving port keyword exist in a preset first dictionary, and determining a value corresponding to the sending port keyword and a value corresponding to the receiving port keyword in the first dictionary according to a determination result includes:
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 a value corresponding to the sending port keyword in the first dictionary is N;
if the sending port keyword does not exist in the first dictionary, determining that a value corresponding to the sending 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 keyword exists in the first dictionary, determining that a 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 determining whether the sending port keyword exists in a preset third dictionary, and 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 values into 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 into a key-value pair of the third dictionary with the sending port keyword as a keyword, includes:
judging whether the sending port keyword exists in a preset third dictionary or not;
if yes, adding the receiving port key word as a value to a key value pair which takes the sending port key word as a key word in the third dictionary;
and if the key value pair does not exist, the sending port key word is used as a key word, the receiving port key word and a value corresponding to the sending port key word in the second dictionary and used as the key word are stored in the third dictionary, and the key value pair in the second dictionary and used as the key word is deleted.
Preferably, the determining whether the receiving port keyword exists in a preset fourth dictionary, and according to a determination result, storing the receiving port keyword as a keyword and other transmitting port keywords corresponding to the transmitting port keyword and the receiving port keyword in the second dictionary as values in the fourth dictionary, or adding the transmitting port keyword as a value to a key value pair in the fourth dictionary with the receiving port keyword as a keyword, includes:
judging whether the receiving port keywords exist in a preset fourth dictionary or not;
if yes, adding the sending port key word as a value to a key value pair which takes the receiving port key word as a key word in the fourth dictionary;
if the key value pair does not exist, determining the key value pair which takes the receiving port key as a value and takes other sending port keys as keys in the second dictionary;
and storing the receiving port key as a key, the transmitting port key and the other transmitting port keys as values in the fourth dictionary, and deleting the key-value pair in the second dictionary with the other transmitting port keys as keys.
Preferably, the 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 relationship respectively includes:
creating a sending port keyword corresponding to the sending port name by using the software component name providing the sending port and the sending 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 for providing the receiving port and the receiving port name in the port connection relationship.
Preferably, the acquiring a 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 the embodiments of the present invention discloses a system for distinguishing communication modes, including:
an obtaining unit, configured to obtain a port connection relationship corresponding to a software combination, where the port connection relationship at least includes: providing a software component name of a sending port, a sending port name, a software component name of a receiving port and a receiving port name;
a creating unit, configured to create a sending port keyword corresponding to the sending port name and a receiving port keyword corresponding to the receiving port name, respectively, based on the port connection relationship;
a determining unit, configured to determine whether the sending port keyword and the receiving port keyword exist in a preset first dictionary, respectively, and determine, 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, where the value corresponding to the sending port keyword is 1 or N, the value corresponding to the receiving port keyword is 1 or N, and N is an integer greater than 1;
a first processing unit, configured to, if a value corresponding to the sending port keyword in the first dictionary and a value corresponding to the receiving port keyword are both 1, store the sending port keyword as a keyword and the receiving port keyword as a value in a second dictionary, where the second dictionary stores a correspondence relationship between one sending port and one receiving port;
a second processing unit, configured to determine whether the sending port keyword exists in a preset third dictionary if a value corresponding to the sending port keyword in the first dictionary is N and a value corresponding to the receiving port keyword is 1, store the sending port keyword as a keyword and a value corresponding to the sending port keyword in the second dictionary as a value in the third dictionary according to a determination result, and delete a key value pair of the sending port keyword in the second dictionary, or add the receiving port keyword as a value to a key value pair of the third dictionary using the sending port keyword as a keyword, where the third dictionary stores a corresponding relationship between one sending port and a plurality of receiving ports;
a third processing unit, configured to, if a value corresponding to the sending port keyword in the first dictionary is 1 and a value corresponding to the receiving port keyword is N, determine whether the receiving port keyword exists in a preset fourth dictionary, according to a determination result, 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, and delete key value pairs corresponding to the other sending port keywords in the second dictionary, or add 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 fourth dictionary stores a corresponding relationship between one receiving port and multiple sending ports.
Preferably, the judging unit includes:
a first determining module, configured to determine whether the sending port keyword exists in a preset first dictionary, determine that a value corresponding to the sending port keyword in the first dictionary is N if the sending port keyword exists in the first dictionary, and determine that a value corresponding to the sending port keyword in the first dictionary is 1 if the sending port keyword does not exist in the first dictionary;
a second determining module, configured to determine whether the receiving port keyword exists in the first dictionary, determine that a value corresponding to the receiving port keyword in the first dictionary is N if the receiving port keyword exists in the first dictionary, and determine that a value corresponding to the receiving port keyword in the first dictionary is 1 if the receiving port keyword does not exist in the first dictionary.
Preferably, the second processing unit includes:
the judging module is used for judging whether the sending port keywords exist in a preset third dictionary or not, if yes, the first processing module is executed, and if not, the second processing module is executed;
the first processing module is configured to add the receiving port keyword as a value to a key value pair in the third dictionary using the sending port keyword as a keyword;
the second processing module is configured to use the sending port keyword as a keyword, use a value corresponding to the sending port keyword in the receiving port keyword and the second dictionary using the sending port keyword as a value, store the value in the third dictionary, and delete a key-value pair in the second dictionary using the sending port keyword as a keyword.
Preferably, the third processing unit includes:
the judging module is used for judging whether the receiving port keywords exist in a preset fourth dictionary or not, if yes, the first processing module is executed, and if not, the second processing module is executed;
the first processing module is configured to add the sending port keyword as a value to a key value pair in the fourth dictionary using the receiving port keyword as a keyword;
the second processing module is configured to determine a key-value pair in the second dictionary, where the receiving port key is used as a value and other sending port keys are used as keys, and execute a third processing module;
the third processing module is configured to store the receiving port keyword as a keyword, the transmitting port keyword and the other transmitting port keywords as values in the fourth dictionary, and delete the key-value pair in the second dictionary with the other transmitting 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; 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; determining a value corresponding to a sending port keyword and a value corresponding to a receiving port keyword in a first dictionary; determining the corresponding relation between a sending port and a receiving port according to the value corresponding to the key word of the sending port and the value corresponding to the key word of the receiving port in the first dictionary; storing the corresponding relation of one transmitting port corresponding to one receiving port in a second dictionary, storing the corresponding relation of one transmitting port corresponding to a plurality of receiving ports in a third dictionary, and storing the corresponding relation of one receiving port corresponding to a plurality of transmitting ports in a fourth dictionary; the correspondence relations stored in the second dictionary and the fourth dictionary correspond to different communication modes respectively, so that the communication modes of the RTE are distinguished, and 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 used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for distinguishing communication modes according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating storing related data in a third dictionary according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating 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 technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this application, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
As known in the art, the AUTOSAR architecture generally includes a plurality of Software components (SWCs), and a plurality of SWCs may form a Software Composition (Composition). Each SWC has a plurality of component ports (ports) through which a Run-Time environment (RTE) can implement a communication mechanism between the SWCs. Since the connection relationship between the ports of the respective components can be divided into a plurality of communication modes of the RTE, and the source code of the RTE is different in different communication modes, it is necessary to distinguish the communication modes of the RTE.
Therefore, embodiments of the present invention provide a method and a system for distinguishing communication modes, in which a port connection relationship corresponding to a software combination is obtained, and a sending port keyword corresponding to a sending port name and a receiving port keyword corresponding to a receiving port name are respectively created based on the port connection relationship. And determining a value corresponding to the sending port key and a value corresponding to the receiving port key in the first dictionary. And determining the corresponding relation between the sending port and the receiving port according to the value corresponding to the key word of the sending port and the value corresponding to the key word of the receiving port in the first dictionary. And storing the corresponding relation of one transmitting port corresponding to one receiving port in a second dictionary, storing the corresponding relation of one transmitting port corresponding to a plurality of receiving ports in a third dictionary, and storing the corresponding relation of one receiving port corresponding to a plurality of transmitting ports in a fourth dictionary. The correspondence relations stored in the second dictionary and the fourth dictionary correspond to different communication modes respectively so as to realize the RTE communication mode distinguishing.
It should be noted that the communication connection between the software components through the ports can be divided into multiple types, and different communication modes can be supported for different communication connection types RTE, for example: when using Send-Receive type communication, the RTE supports three communication modes of 1: n (one sender corresponds to a plurality of receivers), n:1 (a plurality of senders corresponds to one receiver) and 1:1 (one sender corresponds to one receiver), and when using Client-Server type communication, the RTE supports two communication modes of 1: n (one Server corresponds to a plurality of 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 providing a transmitting port (abbreviated as PPortSWC), a transmitting port name (abbreviated as PPort), a software component name providing a receiving port (abbreviated as RPortSWC), and a receiving port name (abbreviated as RPort).
It can be understood that, a communication mechanism between the SWCs in the software composition, i.e., a port connection relationship between the SWCs corresponding to the software composition, is described in an arxml file (e.g., composition).
In the process of implementing step S101 specifically, 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 assembly contains a plurality of port connection relationships, and when reading, each port connection relationship is read one by one from the arxml file, and the following contents of steps S102 to S106 are performed on each read port connection relationship.
Step S102: based on the port connection relation, a sending port keyword corresponding to the sending port name and a receiving port keyword corresponding to the receiving port name are respectively created.
In the process of implementing step S102 specifically, a sending port Key (abbreviated as Key1) corresponding to a sending port name is created by using a sending port name and a software component name providing the sending port in a port connection relationship, for example: key1 ═ PPortSWC + '_ OUT _' + PPort.
Using the name of the software component providing the receiving port and the name of the receiving port in the port connection relationship, a receiving port Key (abbreviated as Key2) corresponding to the receiving port name is created, such as: key2 ═ rortsvc + '_ IN _' + RPort.
Step S103: and respectively judging whether the sending port key words and the receiving port key words exist in a preset first dictionary, and determining values corresponding to the sending port key words and the receiving port key words in the first dictionary according to the judgment results.
It should be noted that, in the first dictionary, the value corresponding to the sending 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 process of specifically implementing step S103, it is determined whether a sending port Key (Key1) exists in a preset first dictionary (portdit for short), and 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 Key, and a value corresponding to the sending port Key is modified to N.
If the sending port key does not exist in the first dictionary, the sending port key is taken as a key, the value corresponding to the sending port key is 1, and the key value pair (the key is the sending port key, and the value is 1) is stored in the first dictionary.
Judging whether a receiving port keyword (Key2) exists in the first dictionary, if the receiving port keyword already exists in the first dictionary, determining that a value corresponding to the receiving port keyword in the first dictionary is N, namely in the first dictionary, the receiving port keyword is Key, and the value corresponding to the receiving port keyword is modified to be N.
If the receiving port key does not exist in the first dictionary, determining that the value corresponding to the receiving port key in the first dictionary is 1, that is, taking the receiving port key as key and the value corresponding to the receiving port key as 1, and storing the key value pair (key is the receiving port key and the value is 1) into the first dictionary.
Step S104: and if the value corresponding to the sending port key word and the value corresponding to the receiving port key word in the first dictionary are both 1, storing the sending port key word as the key word and the receiving port key word as the value in the second dictionary.
It should be noted that the content stored in the second dictionary is a corresponding relationship between one sending port and one receiving port.
In the process of specifically implementing step S104, it is determined whether a value (value) corresponding to the key of the sending port in the first dictionary is 1, and it is determined whether a value corresponding to the key of the receiving port in the first dictionary is 1.
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, the communication mode indicating the sending port name corresponding to the sending port key and the receiving port name corresponding to the receiving port key is the aforementioned 1:1 communication mode, and the sending port key is used as a key (key) and the receiving port key is used as a value (value) to be stored in a second dictionary (simply called dicout 1), that is, the key value pair stored in the second dictionary indicates the correspondence relationship between one sending port and one receiving port (that is, the aforementioned 1:1 communication mode).
That is, the key of the key-value pair in the second dictionary may correspond to a transmit port name (PPort) and the 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 in the first dictionary is 1, judging whether the sending port keyword exists in a preset third dictionary, storing the sending port keyword as a keyword and the receiving port keyword and the value corresponding to the sending port keyword in the second dictionary as values into the third dictionary according to the judgment result, and deleting the key value pair of the sending port keyword in the second dictionary or adding the receiving port keyword as a value into the third dictionary and the sending port keyword as a key value pair.
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 process of implementing step S105 specifically, if the value corresponding to the sending port key in the first dictionary is N and the value corresponding to the receiving port key in the first dictionary is 1, it indicates that the sending port name (i.e., PPort) corresponding to the sending port key is used multiple times, and at this time, the communication mode of the sending port name and the receiving port name is the aforementioned connection relationship of 1: N.
First, it is determined whether the sending port key is already in a preset third dictionary (referred to as "DcitOut 2" for short). If the sending port key already exists in the third dictionary, the receiving port key is added as value to the key value pair in the third dictionary with the sending port key as key (in the case of one-key multiple value), that is, the third dictionary can correspond to multiple values with the sending port key as key.
If the port Key does not exist in the third dictionary, it can be seen from the above that the related processing from step S102 to step S106 is performed on the port connection relationship corresponding to the software combination item by item, and at this time, if the port Key does not exist in the third dictionary, the value (dicout 1[ Key1]) corresponding to the port Key in the second dictionary is queried by using the port Key (Key1) as a Key in the second dictionary (dicout 1). The sending port Key is used as a Key, the receiving port Key (Key2) and a value (DictOut1[ Key1]) corresponding to the sending port Key in the second dictionary are used as values, the Key value pair (Key is the sending port Key, and the values are Key2 and DictOut1[ Key1]) is stored in the third dictionary, and at the moment, the Key value pair of the sending port Key in the second dictionary is deleted, 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 into the fourth dictionary according to the judgment result, and deleting the key value pairs corresponding to the other sending port keywords in the second dictionary, or adding the sending port keyword as a value into the fourth dictionary and taking the receiving port keyword as a key value pair.
It should be noted that the content stored in the fourth dictionary is a correspondence relationship between one receiving port and a plurality of sending ports.
In the process of implementing step S106 specifically, if the value corresponding to the sending port key in the first dictionary is 1 and the value corresponding to the receiving port key in the first dictionary is N, it indicates that the receiving port name (i.e., RPort) corresponding to the receiving port key is used multiple times, and at this time, the communication mode of the sending port name and the receiving port name is the aforementioned connection relationship of N: 1.
First, it is determined whether a receiving port Key (Key2) exists in a preset fourth dictionary (abbreviated as DictOut3), and if so, the sending port Key (Key1) is added as a value to a Key value pair in the fourth dictionary with the receiving port Key as a Key (in the case of one-Key multiple values), that is, the fourth dictionary can correspond to a plurality of values with the receiving port Key as a Key.
If the receiving port Key does not exist in the fourth dictionary, it can be seen from the above that the receiving port name corresponding to the receiving port Key corresponds to a plurality of transmitting port names, and therefore, the receiving port Key is a value, and the second dictionary (DictOut1) is traversed, and the value in the second dictionary is a Key corresponding to the receiving port Key, that is, the Key is another transmitting port Key (called Key3), that is, in the second dictionary, the value corresponding to the other transmitting port Key as a Key is the receiving port Key (i.e., DictOut1[ Key3] < Key2), in this case, the receiving port Key (Key2) is used as a Key, the transmitting port Key (1) and the other transmitting port Key (Key3) are used as values, and the Key pair (Key is the receiving port Key, the Key1 and the Key3) are stored in the fourth dictionary, and deleting the corresponding Key-value pairs of other sending port keys in the second dictionary, namely deleting the Key-value pairs corresponding to DictOut1[ Key3] in the second dictionary.
Through the contents of the steps S101 to S106, the connection relationship of each port of the software combination is processed one by one, and the processing results are stored in the second dictionary to the fourth dictionary, and finally, the contents stored in the second dictionary are the corresponding relationship (the mentioned 1:1 communication mode) that one sending port corresponds to one receiving port, that is, the key in the second dictionary corresponds to the sending port name, and the value corresponds to the receiving port name.
The third dictionary stores correspondence between one transmitting port and a plurality of receiving ports (the above-mentioned 1: n communication mode, in which n represents a receiving port), that is, keys in the third dictionary correspond to transmitting port names, values correspond to receiving port names, and one key corresponds to a plurality of values.
The content stored in the fourth dictionary is the correspondence relationship between one receiving port and a plurality of sending ports (the above mentioned communication mode of n:1, in which case n represents a sending port), that is, the key in the fourth dictionary corresponds to the receiving port name, the value corresponds to the sending 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 keyword corresponding to the sending port name and the receiving port keyword corresponding to the receiving port name are respectively created based on the port connection relation. And determining a value corresponding to the sending port key and a value corresponding to the receiving port key in the first dictionary. And determining the corresponding relation between the sending port and the receiving port according to the value corresponding to the key word of the sending port and the value corresponding to the key word of the receiving port in the first dictionary. And storing the corresponding relation of one transmitting port corresponding to one receiving port in a second dictionary, storing the corresponding relation of one transmitting port corresponding to a plurality of receiving ports in a third dictionary, and storing the corresponding relation of one receiving port corresponding to a plurality of transmitting ports in a fourth dictionary. The correspondence relations stored in the second dictionary and the fourth dictionary correspond to different communication modes respectively so as to realize the RTE communication mode distinguishing.
The above-mentioned process for storing relevant data into the third dictionary in step S105 in fig. 1 is shown in fig. 2, which is a flowchart for storing relevant data into the third dictionary provided in the embodiment of the present invention, and includes the following steps:
step S201: and judging whether the sending port keyword exists in a preset third dictionary or not. If yes, step S202 is executed, and if not, step S203 is executed.
Step S202: and adding the receiving port key as a value to a key value pair of a third dictionary by taking the sending port key as a key.
Step S203: and taking the sending port key as a key word, taking the receiving port key and a value corresponding to the sending port key in the second dictionary and taking the sending port key as the key word as a value, storing the value into a third dictionary, and deleting the key value pair taking the sending port key as the key word in the second dictionary.
It should be noted that, for specific contents in the steps S201 to S203, reference may be made to the contents in the step S105 in fig. 1 in the embodiment of the present invention, and details are not repeated herein.
In the embodiment of the invention, the content stored in the third dictionary is the corresponding relation of one sending port corresponding to a plurality of receiving ports by judging whether the sending port key exists in the third dictionary or not, and storing the sending port key as a key and the corresponding data as a value in the third dictionary according to the judgment result so as to realize the RTE communication mode.
The above-mentioned process of storing relevant data into the fourth dictionary in step S106 in fig. 2 is shown in fig. 3, which is a flowchart of storing relevant data into the fourth dictionary provided in the embodiment of the present invention, and includes the following steps:
step S301: and judging whether the receiving port keywords exist in a preset fourth dictionary or not. If yes, go to step S302, and if not, go to step S303.
Step S302: and adding the sending port key as a value to a key value pair of a fourth dictionary by taking the receiving port key as a key.
In the process of specifically implementing step S302, if the receiving port key exists in the fourth dictionary, the sending port key is taken as value, and is added to the key value pair in the fourth dictionary with the receiving port key as key.
Step S303: key-value pairs in the second dictionary having the receive port key as a value and other transmit port keys as keys are determined.
In the process of specifically implementing step S303, if the receiving port key does not exist in the fourth dictionary, the receiving port key is used as a value, a key value pair corresponding to the value as the receiving port key is determined from the second dictionary, and the key of the key value pair is the other sending port key, that is, in the second dictionary, the value corresponding to the key as the other sending port key is the receiving port key, and step S304 is executed.
Step S304: and storing the receiving port key as a key, the transmitting port key and other transmitting port keys as values into a fourth dictionary, and deleting the key-value pair taking other transmitting port keys as keys in the second dictionary.
In the process of implementing step S304 specifically, the receiving port key is used as a key, the transmitting port key and other transmitting port keys are used as values, the key-value pair is stored in the fourth dictionary, and the key-value pair in the second dictionary using other transmitting port keys as keys is deleted.
In the embodiment of the invention, the content stored in the fourth dictionary is the corresponding relation of one receiving port corresponding to a plurality of sending ports by judging whether the receiving port key exists in the fourth dictionary or not, and storing the receiving port key as a key and the corresponding data as a value in the fourth dictionary according to the judgment result, so as to realize the RTE communication mode.
Corresponding to the method for distinguishing communication modes provided by the embodiment of the present invention, referring to fig. 4, an embodiment of the present invention further provides a structural 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;
an obtaining unit 401, 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 sending port, a sending port name, a software component name providing a receiving port, and a receiving 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 sending port keyword corresponding to a sending 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 creating unit 402 is specifically configured to: and creating a sending port keyword corresponding to the sending port name by using the software component name and the sending port name which provide the sending 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 which provide the receiving port in the port connection relation.
A determining unit 403, configured to determine whether the sending port keyword and the receiving port keyword exist in a preset first dictionary, respectively, and determine a value corresponding to the sending port keyword and a value corresponding to the receiving port keyword in the first dictionary according to the determination result, where the value corresponding to the sending port keyword is 1 or N, the value corresponding to the receiving port keyword is 1 or N, and N is an integer greater than 1.
The first processing unit 404 is configured to, if a value corresponding to a sending port keyword in the first dictionary and a value corresponding to a receiving port keyword in the first dictionary are both 1, store the sending port keyword as a keyword and the receiving port keyword as a value in the second dictionary, where the second dictionary stores a corresponding relationship between one sending port and one receiving port.
The second processing unit 405 is configured to, if a value corresponding to a sending port keyword in the first dictionary is N and a value corresponding to a receiving port keyword in the first dictionary is 1, determine whether the sending port keyword exists in a preset third dictionary, store, according to a determination result, the sending port keyword as a keyword and a value corresponding to the sending port keyword in the second dictionary and a value corresponding to the receiving port keyword in the second dictionary as a value in the third dictionary, and delete a 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 and a sending port keyword as a keyword in the third dictionary, where the third dictionary stores a correspondence relationship between one sending port and a plurality of receiving ports.
A third processing unit 406, configured to, if a value corresponding to a sending port keyword in the first dictionary is 1 and a value corresponding to a receiving port keyword is N, determine whether the receiving port keyword exists in a preset fourth dictionary, according to a determination result, 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 into the fourth dictionary, and delete key value pairs corresponding to other sending port keywords in the second dictionary, or add the sending port keyword as a value into the fourth dictionary and use the receiving port keyword as a key value pair of the keyword, where the fourth dictionary stores a corresponding relationship between one receiving port and multiple sending ports.
In the embodiment of the invention, the port connection relation corresponding to the software combination is obtained, and the sending port keyword corresponding to the sending port name and the receiving port keyword corresponding to the receiving port name are respectively created based on the port connection relation. And determining a value corresponding to the sending port key and a value corresponding to the receiving port key in the first dictionary. And determining the corresponding relation between the sending port and the receiving port according to the value corresponding to the key word of the sending port and the value corresponding to the key word of the receiving port in the first dictionary. And storing the corresponding relation of one transmitting port corresponding to one receiving port in a second dictionary, storing the corresponding relation of one transmitting port corresponding to a plurality of receiving ports in a third dictionary, and storing the corresponding relation of one receiving port corresponding to a plurality of transmitting ports in a fourth dictionary. The correspondence relations stored in the second dictionary and the fourth dictionary correspond to different communication modes respectively so as to realize the RTE communication mode distinguishing.
Preferably, with reference to fig. 4, the determining unit 403 includes a first determining module and a second determining module, and the execution principle of each module is as follows:
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, the value corresponding to the sending port keyword in the first dictionary is determined to be N, and if the sending port keyword does not exist in the first dictionary, the value corresponding to the sending port keyword in the first dictionary is determined to be 1.
And the second judging module is used for judging whether 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 if the receiving port keyword exists in the first dictionary, and determining that the value corresponding to the receiving port keyword in the first dictionary is 1 if the receiving port keyword does not exist in the first dictionary.
Preferably, in conjunction with the content of fig. 4, the second processing unit 405 comprises: the system comprises a judgment module, a first processing module and a second processing module, wherein the execution principle of each module is as follows:
and the judging module is used for judging whether the sending port keywords exist in a preset third dictionary or not, executing the first processing module if the sending port keywords exist, and executing the second processing module if the sending port keywords do not exist.
And the first processing module is used for adding the receiving port key as a value into a third dictionary and taking the sending port key as a key value pair of the key.
And the second processing module is used for taking the sending port key as a key word, taking a value corresponding to the sending port key in the receiving port key and the second dictionary taking the sending port key as the key word as a value, storing the value into a third dictionary, and deleting the key value pair taking the sending port key as the key word in the second dictionary.
In the embodiment of the invention, the content stored in the third dictionary is the corresponding relation of one sending port corresponding to a plurality of receiving ports by judging whether the sending port key exists in the third dictionary or not, and storing the sending port key as a key and the corresponding data as a value in the third dictionary according to the judgment result so as to realize the RTE communication mode.
Preferably, in conjunction with the content of fig. 4, the third processing unit 406 comprises: the system comprises a judgment module, a first processing module, a second processing module and a third processing module, wherein the execution principle of each module is as follows:
and the judging module is used for judging whether the receiving port keywords exist in a preset fourth dictionary or not, executing the first processing module if the receiving port keywords exist, and executing the second processing module if the receiving port keywords do not exist.
And the first processing module is used for adding the sending port key as a value into a fourth dictionary and taking the receiving port key as a key value pair of the key.
And the second processing module is used for determining key value pairs which take the receiving port key as a value and take other sending port keys as keys in the second dictionary, and executing the third processing module.
And the third processing module is used for storing the receiving port key as a key word, storing the sending port key and other sending port keys as values into a fourth dictionary, and deleting the key value pair taking other sending port keys as keys in the second dictionary.
In the embodiment of the invention, the content stored in the fourth dictionary is the corresponding relation of one receiving port corresponding to a plurality of sending ports by judging whether the receiving port key exists in the fourth dictionary or not, and storing the receiving port key as a key and the corresponding data as a value in the fourth dictionary according to the judgment result, so as to realize the RTE communication mode.
In summary, embodiments of the present invention provide a method and a system for distinguishing communication modes, in which a port connection relationship corresponding to a software combination is obtained, and a sending port keyword corresponding to a sending port name and a receiving port keyword corresponding to a receiving port name are respectively created based on the port connection relationship. And determining a value corresponding to the sending port key and a value corresponding to the receiving port key in the first dictionary. And determining the corresponding relation between the sending port and the receiving port according to the value corresponding to the key word of the sending port and the value corresponding to the key word of the receiving port in the first dictionary. And storing the corresponding relation of one transmitting port corresponding to one receiving port in a second dictionary, storing the corresponding relation of one transmitting port corresponding to a plurality of receiving ports in a third dictionary, and storing the corresponding relation of one receiving port corresponding to a plurality of transmitting ports in a fourth dictionary. The correspondence relations stored in the second dictionary and the fourth dictionary correspond to different communication modes respectively so as to realize the RTE communication mode distinguishing.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
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 components and steps have been described above generally in terms of their functionality in order to clearly illustrate this 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 implementation. 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:
acquiring a port connection relation corresponding to the software combination, wherein the port connection relation at least comprises: providing a software component name of a sending port, a sending port name, a software component name of a receiving port and a receiving port name;
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;
respectively judging whether the sending port keyword and the receiving port keyword exist in a preset first dictionary, and determining a value corresponding to the sending port keyword and a value corresponding to the receiving port keyword in the first dictionary according to a judgment result, wherein the value corresponding to the sending port keyword is 1 or N, the value corresponding to the receiving port keyword is 1 or N, and N is an integer greater 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, taking the sending port keyword as a keyword and the receiving port keyword as a value to be stored in a second dictionary, wherein the content stored in the second dictionary is the corresponding relation of one sending port corresponding to one receiving port;
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 receiving port keyword and the value corresponding to the sending port keyword in the second dictionary as values into the third dictionary according to a judgment result, and deleting a key value pair of the sending port keyword in the second dictionary, or adding the receiving port keyword as a value into a key value pair of the third dictionary with the sending port keyword as a keyword, wherein the content stored in the third dictionary is the corresponding relation of one sending port to a plurality of receiving ports;
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 into the fourth dictionary according to a judgment 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 into a key value pair in the fourth dictionary with 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 respectively, and determining a value corresponding to the sending port keyword and a value corresponding to the receiving port keyword in the first dictionary according to a determination result comprises:
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 a value corresponding to the sending port keyword in the first dictionary is N;
if the sending port keyword does not exist in the first dictionary, determining that a value corresponding to the sending 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 keyword exists in the first dictionary, determining that a 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.
3. The method according to claim 1, wherein the determining whether the sending port key exists in a preset third dictionary, and according to a determination result, storing the sending port key as a key and a key-value pair of the receiving port key and the sending port key in the second dictionary as a value in the third dictionary, and deleting the key-value pair of the sending port key in the second dictionary, or adding the receiving port key as a value to a key-value pair of the third dictionary with the sending port key as a key, includes:
judging whether the sending port keyword exists in a preset third dictionary or not;
if yes, adding the receiving port key word as a value to a key value pair which takes the sending port key word as a key word in the third dictionary;
and if the key value pair does not exist, the sending port key word is used as a key word, the receiving port key word and a value corresponding to the sending port key word in the second dictionary and used as the key word are stored in the third dictionary, and the key value pair in the second dictionary and used as the key word is deleted.
4. The method according to claim 1, wherein the determining whether the receiving port key exists in a preset fourth dictionary, and according to a determination result, storing the receiving port key as a key and other transmitting port keys corresponding to the transmitting port key and the receiving port key in the second dictionary as values in the fourth dictionary, or adding the transmitting port key as a value to a key value pair in the fourth dictionary with the receiving port key as a key comprises:
judging whether the receiving port keywords exist in a preset fourth dictionary or not;
if yes, adding the sending port key word as a value to a key value pair which takes the receiving port key word as a key word in the fourth dictionary;
if the key value pair does not exist, determining the key value pair which takes the receiving port key as a value and takes other sending port keys as keys in the second dictionary;
and storing the receiving port key as a key, the transmitting port key and the other transmitting port keys as values in the fourth dictionary, and deleting the key-value pair in the second dictionary with the other transmitting port keys as keys.
5. The method according to claim 1, wherein the creating a sending port key corresponding to the sending port name and a receiving port key corresponding to the receiving port name based on the port connection relationship respectively comprises:
creating a sending port keyword corresponding to the sending port name by using the software component name providing the sending port and the sending 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 for providing the receiving port and the receiving port name in the port connection relationship.
6. The method according to claim 1, wherein the obtaining of the port connection relationship corresponding to the software combination comprises:
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:
an obtaining unit, configured to obtain a port connection relationship corresponding to a software combination, where the port connection relationship at least includes: providing a software component name of a sending port, a sending port name, a software component name of a receiving port and a receiving port name;
a creating unit, configured to create a sending port keyword corresponding to the sending port name and a receiving port keyword corresponding to the receiving port name, respectively, based on the port connection relationship;
a determining unit, configured to determine whether the sending port keyword and the receiving port keyword exist in a preset first dictionary, respectively, and determine, 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, where the value corresponding to the sending port keyword is 1 or N, the value corresponding to the receiving port keyword is 1 or N, and N is an integer greater than 1;
a first processing unit, configured to, if a value corresponding to the sending port keyword in the first dictionary and a value corresponding to the receiving port keyword are both 1, store the sending port keyword as a keyword and the receiving port keyword as a value in a second dictionary, where the second dictionary stores a correspondence relationship between one sending port and one receiving port;
a second processing unit, configured to determine whether the sending port keyword exists in a preset third dictionary if a value corresponding to the sending port keyword in the first dictionary is N and a value corresponding to the receiving port keyword is 1, store the sending port keyword as a keyword and a value corresponding to the sending port keyword in the second dictionary as a value in the third dictionary according to a determination result, and delete a key value pair of the sending port keyword in the second dictionary, or add the receiving port keyword as a value to a key value pair of the third dictionary using the sending port keyword as a keyword, where the third dictionary stores a corresponding relationship between one sending port and a plurality of receiving ports;
a third processing unit, configured to, if a value corresponding to the sending port keyword in the first dictionary is 1 and a value corresponding to the receiving port keyword is N, determine whether the receiving port keyword exists in a preset fourth dictionary, according to a determination result, 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, and delete key value pairs corresponding to the other sending port keywords in the second dictionary, or add 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 fourth dictionary stores a corresponding relationship between one receiving port and multiple sending ports.
8. The system according to claim 7, wherein the judging unit includes:
a first determining module, configured to determine whether the sending port keyword exists in a preset first dictionary, determine that a value corresponding to the sending port keyword in the first dictionary is N if the sending port keyword exists in the first dictionary, and determine that a value corresponding to the sending port keyword in the first dictionary is 1 if the sending port keyword does not exist in the first dictionary;
a second determining module, configured to determine whether the receiving port keyword exists in the first dictionary, determine that a value corresponding to the receiving port keyword in the first dictionary is N if the receiving port keyword exists in the first dictionary, and determine that a value corresponding to the receiving port keyword in the first dictionary is 1 if the receiving port keyword does not exist in the first dictionary.
9. The system of claim 7, wherein the second processing unit comprises:
the judging module is used for judging whether the sending port keywords exist in a preset third dictionary or not, if yes, the first processing module is executed, and if not, the second processing module is executed;
the first processing module is configured to add the receiving port keyword as a value to a key value pair in the third dictionary using the sending port keyword as a keyword;
the second processing module is configured to use the sending port keyword as a keyword, use a value corresponding to the sending port keyword in the receiving port keyword and the second dictionary using the sending port keyword as a value, store the value in the third dictionary, and delete a key-value pair in the second dictionary using the sending port keyword as a keyword.
10. The system of claim 7, wherein the third processing unit comprises:
the judging module is used for judging whether the receiving port keywords exist in a preset fourth dictionary or not, if yes, the first processing module is executed, and if not, the second processing module is executed;
the first processing module is configured to add the sending port keyword as a value to a key value pair in the fourth dictionary using the receiving port keyword as a keyword;
the second processing module is configured to determine a key-value pair in the second dictionary, where the receiving port key is used as a value and other sending port keys are used as keys, and execute a third processing module;
the third processing module is configured to store the receiving port keyword as a keyword, the transmitting port keyword and the other transmitting port keywords as values in the fourth dictionary, and delete the key-value pair in the second dictionary with the other transmitting 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 true CN112612455A (en) 2021-04-06
CN112612455B 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 (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060242330A1 (en) * 2005-04-22 2006-10-26 Ola Torudbakken Proxy-based device sharing
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060242330A1 (en) * 2005-04-22 2006-10-26 Ola Torudbakken Proxy-based device sharing
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 (2)

* Cited by examiner, † Cited by third party
Title
MUNGBEAN GLIESE: "Autosar4.4:软件组件模板 - 端口接口细节", pages 1 - 2, Retrieved from the Internet <URL:https://blog.csdn.net/MichaelMCFD/article/details/105055676> *
吴习文等: "基于AUTOSAR的天然气发动机应用层软件组件设计", 《农业装备与车辆工程》, vol. 58, no. 5, pages 30 - 35 *

Also Published As

Publication number Publication date
CN112612455B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
US7877461B1 (en) System and method for adding dynamic information to digitally signed mobile applications
US11356337B2 (en) System and method for tracking service requests
CN102428685B (en) Method for rating urls
AU2004200496A1 (en) Method, apparatus, and user interface for managing electronic mail and alert messages
US20050027731A1 (en) Compression dictionaries
CA2689881C (en) Interactive compression with multiple units of compression state information
CN105511933A (en) Compiling method of source code and related equipment
MXPA03011674A (en) Method for streaming data between a server and a client.
CN105515900A (en) Method and device for acquiring on-line state of terminal
CN111444547B (en) Method, apparatus and computer storage medium for data integrity attestation
JP2004310371A (en) System, method, server for sharing file and client terminal for file sharing service, file sharing program and recording medium with program recorded
CN112764997B (en) Log storage method and device, computer equipment and storage medium
CN105553727A (en) Method, device and system for updating configuration information
US20020078065A1 (en) Object-oriented method and system for transfrring a file system
CA2689877A1 (en) Method and apparatus for communicating compression state information for interactive compression
CN110334103B (en) Recommendation service updating method, providing device, access device and recommendation system
CN112671717B (en) Method for matching encrypted subscriptions with events
CN112612455A (en) Method and system for distinguishing communication modes
US20160381167A1 (en) Unified Content Posting
CN115658768A (en) Attribute query method and device for state database and related medium
CN115495621A (en) Sensitive word data shielding method, device, equipment and storage medium
CN111523897B (en) Anti-attack method, device and storage medium
CN114490402A (en) Method and device for checking validity of message field
CN112597119A (en) Method and device for generating processing log and storage medium
EP2164231A1 (en) Mobile phone optimized online communication

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