Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings. The embodiments described below by referring to the drawings are illustrative and intended to explain the present application and should not be construed as limiting the application.
The terms first and second and the like in the description, the claims and the drawings of embodiments of the application are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the application described herein may be implemented, for example, in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, some terms in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
And the MQTT server cluster comprises a plurality of MQTT servers, and the plurality of MQTT servers can communicate with each other.
MQTT server-refers to a server in communication with MQTT protocol-based clients.
The vehicle machine refers to the short name of a vehicle-mounted information entertainment product arranged in an automobile, and the vehicle machine can realize information communication between people and vehicles and between vehicles and the outside (vehicle-to-vehicle) functionally
In the prior art, the MQTT protocol is an internet of things communication protocol based on a publish/subscribe mode. In the Internet of vehicles scene, the MQTT protocol is widely applied to Internet of vehicles message access service between vehicles and a server, and the flexible, rapid and safe access of a large number of vehicle systems is ensured.
However, in the related art, when the MQTT protocol-based client communicates with the MQTT server, in order to avoid communication conflicts caused by the fact that multiple MQTT servers in the MQTT server cluster can simultaneously receive connection requests with the same client identifier, each client is connected to one fixed MQTT server through its unique client identifier to perform internet-of-vehicle message communication, that is, the communication between the client and the MQTT server is one-to-one correspondence. Because the client can only connect to the fixed MQTT server, the MQTT server cannot dynamically adjust the load, resulting in poor load balancing of the MQTT server. Meanwhile, when the MQTT server fails or is overloaded and communication with the client cannot be completed, the communication of the client communicating with the failed or overloaded MQTT server cannot be automatically transferred to the healthy or lightly loaded MQTT server, so that the utilization rate of the MQTT server cluster is lower and the availability of the MQTT server is low. However, although the use of dynamic client identifiers enables the client of the MQTT protocol to dynamically communicate with the MQTT server, the use of dynamic client identifiers requires regeneration of the client identifiers each time a connection is made, resulting in failure to maintain session and offline messages, and thus the method of communicating using dynamic client identifiers is not desirable. Therefore, a method is needed to solve the problems of poor load balancing and low availability of the MQTT service in the prior art.
In addition, when the client based on the MQTT protocol communicates with the MQTT server, the problem of unordered sequence of messages reaching the server or other clients exists. Because the client based on the MQTT protocol is communicated with the MQTT server, the message reliability from end to end can only be ensured, and the message sequence from end to end can not be ensured. If one client sends multiple messages, the sequence of the messages reaching the server or other clients may not be consistent with the sending sequence due to the influence of network delay or retransmission mechanism, which is not acceptable for some application scenarios requiring guaranteeing the message sequence. For example, in internet of vehicles applications, the sequential nature of vehicle data is important, such as the need to process vehicle speed and position data in a time-sequential manner when analyzing driving behavior, and the need to process fuel sensor data in a sequential manner when analyzing fuel consumption, which can lead to problems with distortion of analysis results if messages are in a staggered order.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a flow chart of a connection method according to an exemplary embodiment of the present application, which is applicable to a first MQTT server included in an MQTT server cluster, and the method at least includes the following steps S101-S104:
s101, responding to first request data of a client, and acquiring a client virtual identifier of the client and a first transmission carrier corresponding to the client virtual identifier and used for transmitting communication data between the client and a first MQTT server from the MQTT server cluster;
Optionally, the first transport carrier is configured to communicate messages between the client and the first MQTT server.
Specifically, the first transmission carrier is an internal object used by the MQTT server cluster end for managing communication between the client and the MQTT server, and the server sends and receives data through the internal object.
Optionally, in the foregoing step S101, before responding to the acquisition of the first request data of the client, the method further includes the following steps S1-S3:
S1, responding to a first connection request which is sent by the client and comprises a client identifier of the client, and creating the client virtual identifier corresponding to the client identifier;
optionally, the client identifier refers to a unique identifier of the client.
Optionally, the client virtual identifier refers to an identifier newly created for the client and corresponding to the client identifier, which is used as the virtual identifier of the client.
Optionally, the creating the client virtual identifier corresponding to the client identifier includes creating the client virtual identifier corresponding to the client identifier based on a preset rule.
Optionally, creating the client virtual identifier corresponding to the client identifier based on a preset rule includes the following steps S001-S003:
S001, acquiring the number of generated transmission carriers in the MQTT server cluster, and taking a value obtained by adding one to the number of the transmission carriers as a target value;
The specific statistical method of the number of the transmission carriers comprises the steps of setting the initial value to zero when the MQTT server cluster is put into use, and adding one to the value of the number of the transmission carriers when the MQTT server cluster generates one transmission carrier;
illustratively, the number of transport bearers may be counted by defining a global variable global_index, which will be used as an index for the global_index transport bearers. The global_index initial value is 0, and the value of global_index is increased by 1 each time a transport carrier is newly built in the MQTT server cluster.
S002, obtaining the current time and the random number, and generating an initial client virtual identifier according to the target value, the current time and the random number in a format of 'target value_current time_random number';
S003, carrying out hash processing or encoding processing on the initial client virtual identifier to obtain the client virtual identifier.
Illustratively, the target value is current_index, the current timestamp is timestamp (accurate to milliseconds), and the generated random number is random_number. Generating an initial client virtual identifier as current_index_time_random_number, processing the current_index_time_random_number by using a SHA-256 hash function mode to generate a hash value with a fixed length, and taking the hash value as the client virtual identifier, or processing the current_index_time_random_number by using a Base64 coding mode to generate a short and readable client virtual identifier.
In conclusion, a unique and predictable client virtual identifier is generated according to parameters such as a target value, a current timestamp, a random number and the like, and the uniqueness of the client virtual identifier is better ensured by utilizing the random number. And combining the parameters and carrying out hash or encoding processing to ensure the uniqueness and the security of the client virtual identifier.
S2, creating the first transmission carrier corresponding to the client virtual identifier in the MQTT server cluster;
optionally, after binding the first transport carrier with the client virtual identifier, the first transport carrier may be stored in a hash table, so as to facilitate subsequent query and management.
Optionally, the hash table is used for storing a mapping relationship between the client virtual identifier and the first transport carrier. Wherein the client virtual identification may be stored as a key and the first transport carrier may be stored as a value in a hash table.
The generated client virtual identifier is illustratively 5a6 b..A first transport carrier corresponding to the client virtual identifier is connection_object, and the mapping relationship stored in the hash table is [ "5a6 b." ] = connection_object.
S3, sending the client virtual identifier to the client through the first transmission carrier, enabling the client to be connected with the first MQTT server, and communicating with the first MQTT server based on the first transmission carrier and the client virtual identifier.
Optionally, in S101, the obtaining, from the MQTT server cluster, a first transport carrier corresponding to the client virtual identifier and used for transmitting communication data between the client and the first MQTT server includes detecting whether a second transport carrier corresponding to the client virtual identifier is stored in the MQTT server cluster, and if yes, using the second transport carrier as the first transport carrier used for transmitting communication data between the client and the first MQTT server.
Optionally, the detecting whether the second transmission carrier corresponding to the client virtual identifier is stored in the MQTT server cluster includes:
And detecting whether a second transmission carrier corresponding to the client virtual identifier is stored in a hash table in the MQTT server cluster.
Optionally, in S101, acquiring a first transmission carrier corresponding to the virtual identifier of the client from the MQTT server cluster and used for transmitting communication data between the client and the first MQTT server includes detecting whether an idle third transmission carrier exists in the MQTT server cluster if a second transmission carrier corresponding to the virtual identifier of the client is not stored in the MQTT server cluster, if yes, using the third transmission carrier as the first transmission carrier used for transmitting communication data between the client and the first MQTT server, and if not, generating the first transmission carrier used for transmitting communication data between the client and the first MQTT server.
Optionally, the idle third transport bearer refers to a transport bearer in the MQTT server cluster that is not in a corresponding relationship with the binding of the virtual identifier of the client, that is, the transport bearer is in an unused state.
S102, responding to the first request data to obtain corresponding response data;
optionally, in S102, the first request data includes a message content and a message sequence number of the message content, where the message sequence number starts counting after the client first establishes connection with any MQTT server in the MQTT server cluster, and in S102, the responding to the first request data obtains corresponding response data, and includes responding to the message content of the first request data according to the message sequence number, so as to obtain corresponding response data.
Optionally, the message sequence number is used to indicate the order in which the client sends messages to the MQTT server cluster, and the message sequence number is incremented by one each time the client sends a message to the MQTT server cluster.
Alternatively, the message sequence number may be located at a header position of the message content.
Optionally, in the foregoing S102, the responding the message content of the first request data according to the message sequence number to obtain corresponding response data includes the following steps S1021-S1022:
S1021, acquiring the message sequence number from the message content, determining whether an unprocessed message exists before the message sequence number, and if so, acquiring at least one message sequence number to be processed of at least one unprocessed message;
optionally, in S1021, the step of obtaining the message sequence number from the message content and determining whether there is an unprocessed message before the message sequence number includes:
acquiring the message content, storing the message content in a temporary buffer area, extracting the message sequence number from the message content, judging whether the message sequence number is continuous with the message sequence number corresponding to the last message content of the message content, and if not, determining that an unprocessed message exists before the message sequence number;
Optionally, when determining that the message sequence number is discontinuous with the message sequence number corresponding to the last message content of the message content, marking the message content as a to-be-sequenced state, moving to a sequencing cache region, and deleting the message content if the sequencing cache region already stores the to-be-sequenced message content identical to the message content.
S1022, sequencing the message sequence number and the at least one message sequence number to be processed in the order from small to large, and sequentially processing unprocessed messages in the order from small to large until the message content corresponding to the first request data is processed, so as to obtain corresponding response data.
Optionally, in S1022, ordering the message sequence number and the at least one message sequence number to be processed in order from small to large includes:
and in the sequencing buffer area, sequencing the at least one message sequence number to be processed and the message sequence number according to the sequence from small to large by using a rapid sequencing algorithm.
Optionally, after the sorting buffer area performs sorting processing, transferring a message group containing message contents corresponding to the message sequence numbers to a processing queue, and sequentially processing the message group according to the order from small to large, wherein the message group refers to a group of sorted message contents to be processed containing the message contents.
Optionally, if the sequence number of the message corresponding to the message content to be processed in the message group has a sequence number of a jump number, that is, the sequence number of the message corresponding to the message content to be processed in the previous message group is smaller than the sequence number of the message corresponding to the message content to be processed in the next message group by 2, determining that the sequence number of the jump number exists, sending the missing message sequence number to the client, and requesting the client to retransmit the message content corresponding to the missing message sequence number.
Optionally, in order to improve the efficiency of processing the message, when the missing message sequence number (the sequence number of the jump number) exists in the message group, the message content corresponding to the missing message sequence number is requested to be retransmitted to the client, and meanwhile, the to-be-processed message corresponding to the other message sequence numbers smaller than the missing message sequence number in the message group is processed first, so that processing stagnation is avoided, and the efficiency of processing the message is improved.
Optionally, in order to avoid the problem that the message sequence number overflows due to the fact that the message sequence number is too large, the method further comprises the steps of setting a message sequence number threshold, resetting the message sequence number to zero when the message sequence number is not smaller than the message sequence number threshold, wherein in order to avoid the repetition of the message sequence number, a corresponding relation is established between the message sequence number and the current time, the message sequence numbers are ordered according to the sequence order of the time, and the problem that sequence number repeated sequence numbers cannot be ordered is avoided while the sequence number cannot overflow is guaranteed.
In summary, the sequence of the messages of the client corresponding to the virtual identifier of the client received by the first MQTT server is ensured by the message sequence number and the virtual identifier of the client, so that even if the network transmission is delayed, the messages can be ensured to be processed according to the correct sequence. The method can process the messages sequentially in the application scene with the requirement on the message sequence.
S103, feeding back the response data and the client virtual identifier to the client through the first transmission carrier;
And S104, in response to the fact that the preset duration is exceeded, if the fact that the client side communicates with any server in the MQTT server cluster is not detected, the corresponding relation between the virtual identifier of the client side in the MQTT server cluster and the first transmission carrier is relieved.
Optionally, in the foregoing S104, the corresponding relationship between the virtual identifier of the client in the MQTT server cluster and the first transport carrier is released, including,
And deleting the corresponding relation between the client virtual identifier stored in the hash table and the first transmission carrier in the MQTT server cluster.
Optionally, after the correspondence between the client virtual identifier and the first transport carrier is released, the first transport carrier may be rebinding with other client virtual identifiers, so as to establish correspondence between the client virtual identifiers of other clients and the first transport carrier, and the client virtual identifiers may also establish correspondence with other idle or new transport carriers in the MQTT server cluster.
Optionally, in order to improve the efficiency of acquiring the transmission carrier, the application sets a mode of detecting the idle transmission carrier and regenerating the transmission carrier to solve the problem, and the method further comprises detecting whether the idle number of the idle third transmission carrier in the MQTT server cluster is within a preset idle number range, and if not, generating a fourth transmission carrier.
Optionally, the preset idle number range includes a minimum idle number, and if the idle number of the idle third transmission bearer is not less than the minimum idle number, it is determined that the idle number of the third transmission bearer is in the preset idle number range.
Optionally, in order to avoid the problem that too many idle third transmission carriers exist in the MQTT server cluster and avoid the excessive transmission carriers waste system resources, the method further includes:
Detecting whether the idle quantity of the idle third transmission carriers in the MQTT server cluster is checked for a maximum idle threshold, if so, deleting part of the idle third transmission carriers to enable the idle quantity of the rest idle third transmission carriers to be in the preset idle quantity range, wherein the maximum idle threshold is preset as the maximum quantity of idle transmission carriers which can be accommodated in the MQTT server cluster.
In summary, by detecting the number of idle transmission carriers, the peak period and the valley period of the communication demand are determined, and the transmission carriers are automatically generated or deleted based on the peak period and the valley period of the communication demand, so that the number of reserved transmission carriers meets the communication demand, too many reserved transmission carriers are avoided, and resources are saved, wherein the number of the transmission carriers in the peak period is more, the number of the required transmission carriers in the valley period is less, and the number of the required transmission carriers is less.
Optionally, the number of transport bearers that can be generated by different MQTT servers in the MQTT server cluster is different, and the generating the fourth transport bearer includes the following steps S01-S02:
S01, acquiring a target MQTT server of which the number of generated transmission carriers does not exceed a corresponding transmission carrier generation threshold in an MQTT server cluster;
Optionally, the load capacity of each MQTT server in the MQTT server cluster is different, the number of the generatable transmission carriers corresponding to the MQTT server with high load capacity is greater, and the number of the generatable transmission carriers corresponding to the MQTT server with low load capacity is smaller. Thus, in order to avoid overload or overload of a certain MQTT server, a transmission carrier generation threshold corresponding to the load capacity of the MQTT server is set for each MQTT server, where the transmission carrier generation threshold is used for measuring the load capacity of the MQTT server.
Optionally, the transmission carrier includes an identifier of an MQTT server, and the number of the generated transmission carriers of each MQTT server can be obtained by counting the identifiers of the MQTT servers corresponding to the generated transmission carriers.
S02, prompting the target MQTT server to generate a fourth transmission carrier.
Optionally, in order to avoid that the communication request of the client can be continuously processed by other MQTT servers when the first MQTT server fails, the method further comprises:
If the first MQTT server fails, the corresponding relation between the first MQTT server and the client virtual identifier of the client is released, the first transmission carrier generated by the first MQTT server is deleted, the corresponding relation between the client virtual identifier and the fifth transmission carrier of other healthy MQTT servers in the MQTT server cluster is established, and the healthy MQTT server communicates with the client through the fifth transmission carrier.
In summary, by dynamically generating the transmission carrier and generating the transmission carrier according to the load capacity of each MQTT server, the load of any MQTT server in the MQTT server cluster is balanced, and overload of a certain MQTT server is avoided. And when a certain MQTT server is overloaded, the transmission carriers corresponding to the MQTT server can be deleted to generate the transmission carriers corresponding to other MQTT servers with lower loads, so that the load pressure of the MQTT server can be dispersed. The normal operation of the MQTT server is ensured. When the MQTT server fails, the communication between the healthy MQTT server and the client corresponding to the failed MQTT server can be realized through the transmission carrier generated by other healthy MQTT servers, so that when the MQTT server fails, the communication request of the corresponding client is processed by no corresponding MQTT server, and the stability and the continuity of the communication system between the client and the server are ensured.
In summary, the scheme provided by the application includes that a client virtual identifier of a client is obtained from an MQTT server cluster through responding to first request data of the client, a first transmission carrier corresponding to the client virtual identifier and used for transmitting communication data between the client and a first MQTT server is obtained, the first request data is responded to obtain corresponding response data, the response data and the client virtual identifier are fed back to the client through the first transmission carrier, and the corresponding relation between the client virtual identifier and the first transmission carrier in the MQTT server cluster is relieved if communication between the client and any server in the MQTT server cluster is not detected in response to exceeding a preset time period. Any server in the MQTT server cluster can establish communication with the client, so that the MQTT server can dynamically adjust the load, the load balance of the MQTT server is good, and when the MQTT server fails or the load is overweight, the client which is currently in communication with the MQTT server can be transferred to the healthy MQTT server, the utilization rate of the MQTT server cluster is improved, and the availability of the MQTT server is improved.
And secondly, the released transmission carrier can be used by other clients by releasing the transmission carrier occupied by the client but not communicating, so that the use efficiency of the transmission carrier is improved, and the efficiency and the flexibility of the server for managing the transmission carrier are improved. And according to the communication requirements of the peak period and the valley period, the transmission carriers are established or reduced, the number of the transmission carriers is dynamically adjusted according to the communication requirements, the communication efficiency is improved, and meanwhile, the system resources are saved. And dynamically adjusting a transmission carrier generated by the MQTT server according to the load capacity of each MQTT server, preventing one server from being overloaded, and improving the stability and reliability of the MQTT server. By generating unique and predictable client virtual identifiers, the MQTT server cluster is facilitated to manage the correspondence between the client virtual identifiers and the transmission carrier.
Fig. 2 is a schematic structural diagram of a connection device according to an exemplary embodiment of the present application, where the device is adapted to a first MQTT server included in a MQTT server cluster, and the device includes:
An obtaining unit 21, configured to obtain, from the MQTT server cluster, a client virtual identifier of the client and a first transmission carrier corresponding to the client virtual identifier and used for transmitting communication data between the client and the first MQTT server, in response to obtaining first request data of the client;
a response unit 22, configured to respond to the first request data, and obtain corresponding response data;
A feedback unit 23, configured to feed back the response data and the client virtual identifier to the client through the first transmission carrier;
And the detection unit 24 is configured to, in response to exceeding a preset duration, release the correspondence between the virtual identifier of the client in the MQTT server cluster and the first transport carrier if it is not detected that the client communicates with any server in the MQTT server cluster.
Optionally, before the device is used for responding to the first request data of the acquired client, the device is further used for responding to the first connection request which is sent by the client and comprises the client identifier of the client, creating the client virtual identifier corresponding to the client identifier, creating the first transmission carrier corresponding to the client virtual identifier in the MQTT server cluster, sending the client virtual identifier to the client through the first transmission carrier, enabling the client to establish connection with the first MQTT server, and communicating with the first MQTT server based on the first transmission carrier and the client virtual identifier.
Optionally, the device is configured to obtain, from the MQTT server cluster, a first transport carrier corresponding to the client virtual identifier and used for transmitting communication data between the client and the first MQTT server, and specifically configured to detect whether a second transport carrier corresponding to the client virtual identifier is stored in the MQTT server cluster, and if yes, use the second transport carrier as the first transport carrier used for transmitting communication data between the client and the first MQTT server.
Optionally, the device is configured to obtain, from the MQTT server cluster, a first transport carrier corresponding to the client virtual identifier and used for transmitting communication data between the client and the first MQTT server, and specifically configured to detect, if it is detected that a second transport carrier corresponding to the client virtual identifier is not stored in the MQTT server cluster, whether an idle third transport carrier exists in the MQTT server cluster, if yes, use the third transport carrier as the first transport carrier for transmitting communication data between the client and the first MQTT server, and if not, generate a first transport carrier for transmitting communication data between the client and the first MQTT server.
Optionally, in the device, the first request data includes message content and a message sequence number of the message content, the message sequence number starts counting after the client side establishes connection with any MQTT server in the MQTT server cluster for the first time, and the device is used for responding to the first request data to obtain corresponding response data, and specifically is used for responding to the message content of the first request data according to the message sequence number to obtain corresponding response data.
Optionally, the device is further configured to detect whether the idle number of the idle third transport bearer in the MQTT server cluster is within a preset idle number range, and if not, generate a fourth transport bearer.
Optionally, in the device, the number of the transmission carriers which can be generated by different MQTT servers in the MQTT server cluster is different, and the device is used for generating the fourth transmission carrier, specifically for acquiring a target MQTT server, in which the number of the generated transmission carriers does not exceed the corresponding transmission carrier generation threshold, in the MQTT server cluster, and prompting the target MQTT server to generate the fourth transmission carrier.
It should be understood that apparatus embodiments and method embodiments may correspond with each other and that similar descriptions may refer to the method embodiments. To avoid repetition, no further description is provided here. Specifically, the apparatus may perform the above method embodiments, and the foregoing and other operations and/or functions of each module in the apparatus are respectively for corresponding flows in each method in the above method embodiments, which are not described herein for brevity.
The apparatus of the embodiments of the present application is described above in terms of functional modules with reference to the accompanying drawings. It should be understood that the functional module may be implemented in hardware, or may be implemented by instructions in software, or may be implemented by a combination of hardware and software modules. Specifically, each step of the method embodiment in the embodiment of the present application may be implemented by an integrated logic circuit of hardware in a processor and/or an instruction in a software form, and the steps of the method disclosed in connection with the embodiment of the present application may be directly implemented as a hardware decoding processor or implemented by a combination of hardware and software modules in the decoding processor. Alternatively, the software modules may be located in a well-established storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, and the like. The storage medium is located in a memory, and the processor reads information in the memory, and in combination with hardware, performs the steps in the above method embodiments.
Fig. 3 is a schematic block diagram of an electronic device provided by an embodiment of the present application, which may include:
A memory 301 and a processor 302, the memory 301 being for storing a computer program and for transmitting the program code to the processor 302. In other words, the processor 302 may call and run a computer program from the memory 301 to implement the method in the embodiment of the present application.
For example, the processor 302 may be configured to perform the above-described method embodiments according to instructions in the computer program.
In some embodiments of the application, the processor 302 may include, but is not limited to:
A general purpose Processor, digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field programmable gate array (Field Programmable GATE ARRAY, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like.
In some embodiments of the present application, the memory 301 includes, but is not limited to:
Volatile memory and/or nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM) which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available, such as static random access memory (STATIC RAM, SRAM), dynamic random access memory (DYNAMIC RAM, DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate Synchronous dynamic random access memory (Double DATA RATE SDRAM, DDR SDRAM), enhanced Synchronous dynamic random access memory (ENHANCED SDRAM, ESDRAM), synchronous link dynamic random access memory (SYNCH LINK DRAM, SLDRAM), and Direct memory bus RAM (DR RAM).
In some embodiments of the application, the computer program may be partitioned into one or more modules that are stored in the memory 301 and executed by the processor 302 to perform the methods provided by the application. The one or more modules may be a series of computer program instruction segments capable of performing the specified functions, which are used to describe the execution of the computer program in the electronic device.
As shown in fig. 3, the electronic device may further include:
A transceiver 303, the transceiver 303 being connectable to the processor 302 or the memory 301.
The processor 302 may control the transceiver 303 to communicate with other devices, and in particular, may send information or data to other devices, or receive information or data sent by other devices. The transceiver 303 may include a transmitter and a receiver. The transceiver 303 may further include antennas, the number of which may be one or more.
It will be appreciated that the various components in the electronic device are connected by a bus system that includes, in addition to a data bus, a power bus, a control bus, and a status signal bus.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a computer, enables the computer to perform the method of the above-described method embodiments. Alternatively, embodiments of the present application also provide a computer program product comprising instructions which, when executed by a computer, cause the computer to perform the method of the method embodiments described above.
When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a Solid State Drive (SSD)), or the like.
Those of ordinary skill in the art will appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. 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 application.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules illustrated as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., 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. For example, functional modules in various embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily appreciate variations or alternatives within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.